Knowledge Base
HOME » KNOWLEDGE BASE » FORUM

sending 0x00

I am using an Arduino and a SX1278 LoRa module to transmit sensor data but have some problems with sending the data.

My LoRa related code is:
uint8_t data[9];
data[0] = 0x1E;
data[1] = 0x41;
data[2] = 0x42;
data[3] = 0x43;
data[4] = 0x44;
data[5] = 0x45;
data[6] = 0x46;
data[7] = 0x47;
data[8] = 0x48;

LoRa.beginPacket();
LoRa.print((char*)data);
LoRa.endPacket();


All data is received correct but if I change data[5] = 0x00 only the first 5 bytes are received. Can someone please explain what I am doing wrong here?

I would like to send a counter variable and sensor values as 2-byte value but if one byte is 0 the data after would be ignored.

Thank you!