8 ping (ultrasonic) sensors via Serial-in-watcher to isa HELP!
-
Hey guys,
we just can't figure it out. please please please help setup:Arduino > usb serial > isadora8 ping sensors who send a line of data like this: 0=21cm, 1=30cm, 3=203cm, etc.Arduino's serial monitor works, as well as the serial monitor of Isadora, but when we place the Serial-in-watcher(text) actor and assign 8 integers to read the actor doesn't work or gets weird lines of data.it doesn't help if we delete the = sign and the 'cm' line. we googled for days, seen everything, and yes, we are aware that Serial in Isadora is tricky, but this looks like the only option. We can't get processing to work (arduino>SERIAL>processing>OSC>isadora), as well as MAX/MSP.to conclude this to one question;How do we feed a string of values into Isadora so that Isadora can extract each value separate. -
These are not professional guesses, but still.
Weird data may indicate baud-rate mismatch sometimes.Can you program Arduino to send ”Isadora friendly” data? This is what I would try to do. -
Hey Vanakaru,
We are very careful with the Baud-rate and they definitely match.We are now trying to use different output like this: a2b23b50c57 (where the letter is the name of sensor so that we don't get cluttered with wrong int's)Is there something like a handbook of Isadora coding? It states nowhere if it is CC+ based or Java.
All we need to do now is somehow make clear for Isadora that is are 8 different values so Isadora can cut it in 8 portions.thnx! -
Hello,
The working way (I use it last week for workshop), is to add 1000 to all of your values, to be sure they have all 4 digit and put the number of your sensor before, like thatArduino side (with anports = number of analog Pin)void loop(){for (int i=0; i<=anports; i++) {value = 1000+analogRead(i); // add 1000 to the value of the pin to ensure 4 digits.Serial.print(i,DEC); //send the sensor numberSerial.print(value); //send the valueSerial.println(); //send the eomdelay (10);//to slow the sending}Isadora side (inside Serial In Watcher - Text, with eom char = 10)"i"
value_i : integer = 4 digits
With i from 0 to anports
Hope that works for you,
Jacques
-
-
Hey jhoepffner, Very big thank you in advance! We are in prague at the Prague Quadriennale at the moment but will test it within two days when we get home. The code you posted makes sense and we really hope this will do the trick. We'll keep u posted, Thnx!
-
Got it!,,, well we thought..
Thnx to Jacques lines of code for the serial watcher actor we manage to read te correct value's. Never the less did we have to cut the amount of sensors from 8 to 4 and later on even one. somehow everything worked separately but when we got the patching going the Isadora decided to read ghost values. some didn't, some did. after three days of switching sensors, checking cables and connections we just picked the best we thought we had and kept it with that.It was a great lesson and practice but it reminded me that stuff mostly fails when systems and logic meet.
Anyhow it didn't work as we'd hoped, but people are very excited and surprised by the fact that they trigger a sequence mapped on paintings.thnx again for all the help