int incomingByte = 0; // for incoming serial data
char str1[4];
void setup() {
Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
}
void loop() {
if (Serial.available() >= 1) {
incomingByte = Serial.read();
sprintf(str1, "%02X ", incomingByte);
Serial.print(str1);
}
}
It outputs:
7E 00 18 92 00 13 A2 00 40 A9 05 69 FF FE C1 01 00 00 0F 03 FF 03 FF 03 FF 03 FF 8B
My question is, how do I access/save the first byte, 7E, into a variable? and the second, and so on...
I've tried almost everything, and ive been going in circles for hours and hours
View the full article on Stellarisiti. 43oh pulls Stellarisiti Energia posts, so that members do not miss out questions. Please bear with this arrangement for now. Thanks!