writing multiple bytes to the serial port / Arduino

Jul 28, 2013 at 2:01pm

writing multiple bytes to the serial port / Arduino

I’m starting to play with Arduino (to control DMX) and most of the examples just write 1 byte to the Arduino: I’d like to send messages with 2 bytes (channel, value).

If I send it into a [serial] object as a list, the arduino doesn’t see it as ’2 bytes received’

On the arduino, I”m using “Serial.available()” to report back how many bytes were received, followed by two ‘Serial.read’ to read the two bytes, and store them as a value

While reading messages that were sent by the Arduino works great (using the [serial] object) I’m struggling with the sending of messages: I’m also not 100% sure if I can just send numbers, or if I need to convert to symbol, or ASCI! Any ideas anyone?

Thanks!!

#257381
Aug 2, 2013 at 5:03am

ok so it’s working now, looks like sending it in whichever format works.. not sure why I didn’t get it to work first time!

thanks for watching :-)

#257846
Aug 2, 2013 at 5:04am

btw is there a way to delete posts like this which just take up space without being helpful?

#257847

You must be logged in to reply to this topic.