Compiling error lecture 7
Posted: Wed Apr 21, 2021 12:06 pm
Hi,
compiling arduino code without any modification for lecture 7, i got the following error:
Arduino : 1.8.13 (Windows 10), Carte : "Arduino Uno"
C:\Users\admin\Desktop\ERA\SDR\URCmaterialsV1.0\Scripts\Scripts\Lectures 7&8\Arduino\CC1101_configurable\cc1101_configurable.ino: In function 'void loop()':
cc1101_configurable:40:65: error: cannot convert 'uint8_t** {aka unsigned char**}' to 'char*' for argument '1' to 'int sprintf(char*, const char*, ...)'
sprintf(pckt.data, "This is message number: %03d\n", ++counter);
^
cc1101_configurable:41:29: error: cannot convert 'uint8_t** {aka unsigned char**}' to 'const char*' for argument '1' to 'size_t strlen(const char*)'
int len = strlen(pckt.data);
^
exit status 1
cannot convert 'uint8_t** {aka unsigned char**}' to 'char*' for argument '1' to 'int sprintf(char*, const char*, ...)'
Please help
Thank you
compiling arduino code without any modification for lecture 7, i got the following error:
Arduino : 1.8.13 (Windows 10), Carte : "Arduino Uno"
C:\Users\admin\Desktop\ERA\SDR\URCmaterialsV1.0\Scripts\Scripts\Lectures 7&8\Arduino\CC1101_configurable\cc1101_configurable.ino: In function 'void loop()':
cc1101_configurable:40:65: error: cannot convert 'uint8_t** {aka unsigned char**}' to 'char*' for argument '1' to 'int sprintf(char*, const char*, ...)'
sprintf(pckt.data, "This is message number: %03d\n", ++counter);
^
cc1101_configurable:41:29: error: cannot convert 'uint8_t** {aka unsigned char**}' to 'const char*' for argument '1' to 'size_t strlen(const char*)'
int len = strlen(pckt.data);
^
exit status 1
cannot convert 'uint8_t** {aka unsigned char**}' to 'char*' for argument '1' to 'int sprintf(char*, const char*, ...)'
Please help
Thank you