Hello,
I am currently trying to take a BigNumber value, and use udp.printf and send it to another ESP via udp, however, I get the following error:
invalid user-defined conversion from 'BigNumber' to 'const char*'
How would I do this?
Thank you!
Most likely, you would do something other than what you are trying to do now.
Since you failed to read and follow the directions in "How to use this forum", no one knows what that might be.
invalid user-defined conversion from 'BigNumber' to 'const char*'
BigNumber is either a struct or class type variable defined somewhere and you're trying to turn it into chars (signed 8-bit).
This example sets the address of an unsigned long into a byte pointer then uses the byte pointer to access the UL byte by byte to show the value.
void setup()
{
Serial.begin( 115200 );
Serial.println( F( "\n\n\na bit about RAM\n" )); // F() macro keeps text in flash
unsigned long fourBytes = 0xAABBCCDD;
byte * bp = (byte *) &fourBytes; // casts the address of fourBytes to byte pointer
Serial.println( fourbytes, HEX );
Serial. print( F( "\nfourbytes read as bytes = 0x" ));
for ( char i = 3; i >= 0; i-- )
{
Serial.print( *( bp + i ), HEX );
}
Serial.println();
}
void loop()
{
}