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 error lecture 7
-
- Posts: 4
- Joined: Wed Nov 04, 2020 5:31 pm
Re: Compiling error lecture 7
Dear CN8ZE,
please try to change line 40 of cc1101_configurable to:
and line 41 to:
We cannot reproduce the problem, even though we have the same version of the Arduino IDE, but this edit should fix the problem and will be included in future releases
Lorenzo
please try to change line 40 of cc1101_configurable to:
Code: Select all
sprintf((char *) pckt.data, "This is message number: %03d\n", ++counter);
Code: Select all
int len = strlen((char *) pckt.data);
Lorenzo