[SOLVED] Control multiple servos with Isadora -> Arduino (example attached)

  • @barneybroomer All servos work fine without Isadora

  • @dusx I think there is a problem with the serial send function in Isadora, not sure. I just made the same structure with openframeworks, the same Arduino and same servos and pins etc and it works perfectly. Also just sending a string a cutting it up the same way on the Arduino.

    I have marginally better results with send raw serial, but still not at all usable, massive delays and commands seem to queue.

    This is for a class, so now I need to run an intermediate app and get OSC from Isadora.

    It would be great if someone else could test this, or suggest another way to send multiple values and verify that the send serial is functioning, before I go for a bug report. To me it seems there is something wrong with the serial sending, like it is sending a really huge buffer that is pre allocated and takes ages to send and receive.

  • @juriaan I would love to use OSC but I am looking at a pile of arduino UNO's so no joy.

  • Beta Platinum

    @fred said:

    a problem with the serial send function in Isadora

     Hi @Fred,

    I have just fired up an Arduino Micro with a PMW 12v relay plus a 3v infrared remote, I had no problem communicating to both at the same time running a pulse generator at 30 hz through a sequential trigger to switch the relay and a pulse generator at 5 hz switching the remote. I did not see any issues with the Send Serial Data in the patch setup. 

  • @bonemap can you send me your patch and Arduino code to test here? I did not have trouble when using single parameters with the send serial but only with multiple parameters on a send serial.

  • Beta Platinum

    @fred said:

    send me your patch and Arduino code

    Here it is, but be aware that the code and the patch are not well annotated. (apologies I uploaded the wrong files - these are a match)

  • @bonemap Cheers, I just took a look, and I also had no trouble sending single characters as you are doing in this example, the issue I am getting is sending more than that, I need to control 4 servos so I have to send 4 different kinds of messages, that should be readable as strings and then split them out at the other end. I make a string like this (using either send serial or send raw serial) A<intvalA>B<intvalB>C<intvalC>D<intvalD>| where <intvalN> are integers (without using the :C delimiter in the send serial so they are sent as ascii), or just using the text formater and creating a string and sending with send Raw Serial.

    Either way the messages are received properly but with a lot of delay and not reliably. As I said, the simple versions, just sending a char to switch a Boolean seems to work fine, but more than that gives issues.

    Sending the same strings from an application I wrote myself works fine and is very responsive, so either I am misunderstanding how the formatting in the send serial actor works, or there is an issue. It would still be great if someone can test something closer to what I am doing.

  • Beta Platinum

    @fred said:

    great if someone can test something closer to what I am doing

     Yep! well my other projects use NodeMCU and OSC, have not used longer strings through the Send Serial Data modules that I can recall. I hope you can work it out.

    best wishes


  • @bonemap yes I much prefer to use other protocols but this should work, and it is for is easier to keep everything in one place for beginner students.

    At any rate, here is the Isadora patch and the arduino file in case anyone has the time to take a look.Isadora-Arduino serial version _not

  • Beta Platinum

    Will hook up an Arduino and give it a shot when I get back from work.

  • @juriaan @bonemap

    I found out what the issue is. Arduino read as string is very slow and takes 2.5 seconds to resolve. I have a version now that reads byte by byte and it works great. I have attached the Arduino and Isadora files here.Isadora-Arduino serial version _WORKING!.zip

  • Tech Staff


    Good to hear.. I was actually going thru your code to debug this last night and felt it was on the processing side but couldn't be sure yet.