Payload: Arduino - The Things Network (Arduino MKR WAN 1310)

Hi all :slight_smile: ,

first of all greetings to all. I am new to the community, and this is the first post I am writing.

After searching many hours on the internet and on the forum, I have not found the information I need, so I decided to write this post.

I have made my first connection to The Things Network using the following tutorial:

Connecting MKR WAN 1300 to The Things Network (TTN)

With this example, the variable "payload" is created and sent to TTN. So far so good.

int var1 = 10;
byte payload = var1;

My problem arises when I want to send two variables in a single message. How can I send two variables in a single message?

For example:
int var1 = 10;
int var2 = 20;

Thank you very much in advance for your help.

Best regards

post your full code.

basically what is sent to the LoRaModem instance in between the modem.beginPacket(); and modem.endPacket(true); will make it to the other side.

for future post, do yourself a favour and please read How to get the best out of this forum and post accordingly (including code tags and necessary documentation of your ask).

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.