-
Notifications
You must be signed in to change notification settings - Fork 20
Transmit Operation
Chandra Wijaya Sentosa edited this page Jan 12, 2022
·
2 revisions
Transmit operation begin with calling beginPacket()
method following by write()
method to write package to be tansmitted and ended with calling endPacket()
method. For example, to transmit "HeLoRa World!" message and an increment counter you can use following code.
// message and counter to transmit
char message[] = "HeLoRa World!";
uint8_t counter = 0;
LoRa.beginPacket();
LoRa.write(message, sizeof(message)); // write multiple bytes
LoRa.write(counter++); // write single byte
LoRa.endPacket();
LoRa.wait();