Xbee + LabVIEW sends hex data to Xbee + Arduino

7E 00 0A 83 00 00 1D 00 01 00 03 00 03 58

how do i code this hex data in arduino?

my code is,

#include <SoftwareSerial.h>
SoftwareSerial XBee(2, 3); // RX, TX

void setup() {
XBee.begin(9600);
Serial.begin(9600);
}

void loop() {
if (Serial.available()) {
XBee.write(Serial.read());
}
if (XBee.available()) {
Serial.write(XBee.read());
delay (500);
}
}

how do i code this hex data in arduino?

The question does not make sense.

Some program is, somehow, setting up some data to send, via an XBee, to the Arduino. The Arduino reads that data, and does NOTHING more than write it to the serial port, where some other application reads it.

What we know is that LABVIEW is the first program. But, you have not shown that program, or even defined whether it is sending ASCII data or binary data.

One could guess, from understanding XBees, that the program is sending an XBee packet, in binary, in a specific format. But, I'd never write code based on guessing, except as a last resort.

One could also guess that the second program is the Serial Monitor app, which does NOT understand binary data, so using Serial.write() makes no sense. But, I hate guessing.

So, you need to add a few details to your next reply.

1 Like