Hi, I have a RF24 network running just fine passing data between nodes.
I now have some large numeric data to pass from one node to the base. I seem to be getting garbage at the base. If I send the following
uint32_t bigStuff = 12345670003;
// I send that
// and if I try to see what was sent using
Serial.println(bigStuff);
I get 3755735411
I am not sure it the data is getting messed up in transmission or what.
How can I look at the numeric value I send and then look at the numeric value I received?
I found some 64int stuff by Rob Tillaart but it will not compile in 1.6.10.
Thanks for any help.
Just because you have a 32 bit variable on the left side of an equal sign does not mean that the right side is handled as 32 bits. C++ does not work that way.
12345670003 is too big for 32 bits anyway.
SalineSolution:
Hi, I have a RF24 network running just fine passing data between nodes.
I now have some large numeric data to pass from one node to the base. I seem to be getting garbage at the base. If I send the following
uint32_t bigStuff = 12345670003;
// I send that
// and if I try to see what was sent using
Serial.println(bigStuff);
I get 3755735411
I am not sure it the data is getting messed up in transmission or what.
How can I look at the numeric value I send and then look at the numeric value I received?
I found some 64int stuff by Rob Tillaart but it will not compile in 1.6.10.
Thanks for any help.
Grab this code: GitHub - krupski/Print: Improved Print functionality for Arduino (including stream support, print_P and related).
...and replace your Print.cpp and Print.h in the main Arduino directory. It will print anything (even int64 and uint64).
A new library is nice but by itself will not fit 34 bits into 32.
By the way, 3755735411 = 12345670003 modulo 2^32
Krupski:
Grab this code: GitHub - krupski/Print: Improved Print functionality for Arduino (including stream support, print_P and related).
Thanks Krupski, I am continually amazed at the puerile folk predominating theses forums who only want to criticize and deride rather than actually help, on a Help forum.