Help with sending long serial message
I have a programmer who has formatted a long serial message for communicating with many different Arduino boards on a wireless network. The message is an ASCII string like the following example:
OP1103001255600000Z
Where OP is the header, 11 is a command, 03 is a board ID, 001 255 600 000 are values, and Z is an end-of-message marker.
THe Max serial object will not take this message. I can send this type of message with a terminal program such as CoolTerm, but the Max serial object won't recognize it.
Any way to send this out of Max in one piece? I don't believe I can break it up and have it work.
Thanks in advance for any help.
You need to send each piece of information seperately, try splitting up your symbol into a list and then [spell] it into [serial]. I'm no expert though!
lh
I'll give it a try.
No go...[spell] is a nice object, but the board won't respond.
this might help, it sounds similar. yes, the formatting for [serial] is a bit strange at first, but the fact that you have it working in a Terminal program is encouraging. The problem seems to come from mixing letter-style commands with integer values, which need to be sent as the ascii values for the numbers, not the numbers themselves. also there is the possibility of needing to send spaces between values. check the patch at the bottom:
hope it gets you there!
p.s. I think that even if you have it formatted as a list, [serial] still sends it a byte at a time, so breaking it up shouldn't matter. it's about the start and end codes for the device to know where the lists are in the stream.