• Isadora
  • Get it
  • Forum
  • Help
  • ADD-ONS
  • Newsletter
  • Impressum
  • Dsgvo
  • Impressum
Forum

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    8 ping (ultrasonic) sensors via Serial-in-watcher to isa HELP!

    How To... ?
    3
    7
    1948
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      peppironi89 last edited by

      Hey guys,

      we just can't figure it out. please please please help setup:
      Arduino > usb serial > isadora
      8 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.

      6de547-schermafbeelding-2015-06-15-om-14.34.34.png 86eb86-schermafbeelding-2015-06-15-om-14.35.13.png

      1 Reply Last reply Reply Quote 0
      • vanakaru
        vanakaru last edited by

        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. 

        MBP 4.1 & MBP (Retina, Mid 2012) MBP Retina 2017

        1 Reply Last reply Reply Quote 0
        • P
          peppironi89 last edited by

          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!
          1 Reply Last reply Reply Quote 0
          • jhoepffner
            jhoepffner last edited by

            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 that
            Arduino 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 number
              Serial.print(value); //send the value
              Serial.println(); //send the eom
              delay (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

            Jacques Hoepffner http://hoepffner.info
            GigaByte 550b / Ryzen 7 3800X / Ram 64 Go / RTX 3090 24 Go / SSD 2 To / raid0 32 To
            MBP 13' i5 2.6 Ghz 16 Go / Intel Iris / macOs 10.11.6 / izzy 2.6.1 + 3.0.3b2
            MBP 15' i7 2.6 Ghz 16 Go / GTX 650M 1Go/ MacOs10.13.3 / Izzy 2.6.1
            MSI GS65 i7 3.6 Ghz 32 Go / GTX 1070 8 Go / Windows 10 / Izzy 3.0.3b2

            1 Reply Last reply Reply Quote 0
            • jhoepffner
              jhoepffner last edited by

              also eom char is 10 (line new), not 13 (carriage return)

              here a sample

              24207a-isadoraarduino01.zip

              Jacques Hoepffner http://hoepffner.info
              GigaByte 550b / Ryzen 7 3800X / Ram 64 Go / RTX 3090 24 Go / SSD 2 To / raid0 32 To
              MBP 13' i5 2.6 Ghz 16 Go / Intel Iris / macOs 10.11.6 / izzy 2.6.1 + 3.0.3b2
              MBP 15' i7 2.6 Ghz 16 Go / GTX 650M 1Go/ MacOs10.13.3 / Izzy 2.6.1
              MSI GS65 i7 3.6 Ghz 32 Go / GTX 1070 8 Go / Windows 10 / Izzy 3.0.3b2

              1 Reply Last reply Reply Quote 0
              • P
                peppironi89 last edited by

                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!

                1 Reply Last reply Reply Quote 0
                • P
                  peppironi89 last edited by

                  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
                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post