Long time reader, first time poster. I have a question in regard to serial communication from Max MSP to Arduino which controls some servo motors. (I am also going to post the same question in the MAX forum)
I have tested the Max patch serial output and it is reading correctly (in the 'Max Window'). When I then use it with Arduino, I can see the TX/TR LED's flash when a number has been output. However, when I add the final component, the servo, it doesn't want to work/move.
To give some context, I have a matrix in Max with 4 rows and 32 columns. Each row is assigned a 'bit number' for the purposes of communicating to a specific servo. when the patch is run, each time a highlighted matrix point is passed, it sends the assigned 'bit number' out of the serial port.
Arduino then reads the 'bit number' and goes through it's code and sends it to the specific pin to move the servo motor.
When I use the serial monitor with Arduino and send the bit number manually, the servo moves.
Example of code below using 'bit number' 120 as dummy number and moving the servo to 45 degrees and then back to Zero. (virtually tested using TinkerCAD (manual number assignment))
I have just tested virtually using TinkerCAD with multiple servo's and it is pretty much doing what I want it too. Now it's just thinhs like speed and how quick the servo can read the data and react. But that is not part of this thread and something I will try to figure out myself before asking for help.