We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpElectronics,  Serial Library › sending 6 bytes via serial
Page Index Toggle Pages: 1
sending 6 bytes via serial? (Read 920 times)
sending 6 bytes via serial?
Aug 20th, 2006, 2:28pm
 
Hello,

How should I send 6 bytes via port.write?
I'm using bytes array:

byte[] myVar = new byte[6];
myVar[0] = 21;
myVar[1] = 22;
myVar[2] = 23;
myVar[3] = 24;
myVar[4] = 25;
myVar[5] = 26;
port.write(myVar);  

I'm comunicating with BS2 and I want that the microcontroller have to wait for 6 bytes and after debug the value:

SERIN serinPin, n9600, [WAITSTR receiveVar\6]
DEBUG STR receiveVar
SEROUT seroutPin, n9600, [65]

But Debug doesn't show anything and nonetheless processing gets "A".

How to make the effective communication: the microcontroller gets 6 bytes and in the respond sents "A"?

Thank you!
J
Page Index Toggle Pages: 1