@aaa wrote:
I’m testing out sending some basic serial data from oF -> Arduino and running into some problems. It works for a couple cycles and then stops:
unsigned char myByte = 0; mySerial.writeByte(myByte); ofSleepMillis(1000); myByte = 90; mySerial.writeByte(myByte); ofSleepMillis(1000); myByte = 180; mySerial.writeByte(myByte); ofSleepMillis(1000); myByte = 90; mySerial.writeByte(myByte); ofSleepMillis(1000); ofLog() << "hi";
The Arduino is simply reading these incoming bytes and actuating a servo motor to that position. It works just fine in Processing, which leads me to believe this is a problem with oF or the Raspberry Pi it’s running on. I remember seeing a post for creating long term installations that strongly suggested using MIDI instead of USB Serial comms, perhaps for this exact reason?
Posts: 2
Participants: 2