We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
i have a short question. How can i convert one byte (0x0a) to an Integer (10)?
I transmit the lora tx power from the base to the receiver, that every unit have the same txpower.
I use this example: https://github.com/sandeepmistry/arduino-LoRa/blob/master/examples/LoRaDuplexCallback/LoRaDuplexCallback.ino
Thats my code in the base, where is the txpower value transmitted.
void sendMessage(String message) { LoRa.beginPacket(); LoRa.write(destination); LoRa.write(localAddress); LoRa.write(byte_txpower); LoRa.write(msgCount); LoRa.write(message.length()); LoRa.print(message); LoRa.endPacket(); msgCount++; }
Now when iam reading the transmitted data with byte incomingTxPower = LoRa.read(); // incoming txpower
byte incomingTxPower = LoRa.read(); // incoming txpower
And the value was a 17, I get only the 23.
I read in this forum, but i didnt understand it.
https://stackoverflow.com/questions/12240299/convert-bytes-to-int-uint-in-c
Geetings -Martin
The text was updated successfully, but these errors were encountered:
You need to read in this sequence to get txpower.
byte recvID= LoRa.read(); // incoming txpower byte sendID= LoRa.read(); // incoming txpower byte txpower = LoRa.read(); // incoming txpower
Sorry, something went wrong.
No branches or pull requests
Hello,
i have a short question. How can i convert one byte (0x0a) to an Integer (10)?
I transmit the lora tx power from the base to the receiver, that every unit have the same txpower.
I use this example:
https://github.com/sandeepmistry/arduino-LoRa/blob/master/examples/LoRaDuplexCallback/LoRaDuplexCallback.ino
Thats my code in the base, where is the txpower value transmitted.
void sendMessage(String message) {
LoRa.beginPacket();
LoRa.write(destination);
LoRa.write(localAddress);
LoRa.write(byte_txpower);
LoRa.write(msgCount);
LoRa.write(message.length());
LoRa.print(message);
LoRa.endPacket();
msgCount++;
}
Now when iam reading the transmitted data with
byte incomingTxPower = LoRa.read(); // incoming txpower
And the value was a 17, I get only the 23.
I read in this forum, but i didnt understand it.
https://stackoverflow.com/questions/12240299/convert-bytes-to-int-uint-in-c
Geetings
-Martin
The text was updated successfully, but these errors were encountered: