Hello,
When I try to compil a code on my Chipkit WF 32 I got a failed compiling but not on my arduino mega...
On the IDE I change the board when I compile for the arduino or digilent board. I tryed the arduino IDE and UECIDE and I get the same result, failed on the Chipkit.
I've reduce the code to show you exactly where the error come from, that's come from the convertion of the char array to unsigned integer. I don't know what's happening. If some one have an idea :)
Thanks
CODE :
void setup()
{
}
void loop()
{
}
int Motor_2(unsigned char numInputBytes, unsigned char* input, unsigned char* numResponseBytes, unsigned char* response)
{
//Convertion of the char Array input to unsigned interger (Step to move)
unsigned int Step_To_Move_2 = atoi(input);
}
Error Message :
Arduino : 1.8.14 Hourly Build 2021/05/11 02:33 (Windows 10), Carte : "chipKIT WF32, Custom / Disabled" C:\Users\pgrol\Desktop\temporaire\temporaire.ino: In function 'int Motor_2(unsigned char, unsigned char*, unsigned char*, unsigned char*)':
temporaire:12:41: error: invalid conversion from 'unsigned char*' to 'const char*' [-fpermissive]
unsigned int Step_To_Move_2 = atoi(input);
^
In file included from C:\Users\pgrol\AppData\Local\Arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32/WProgram.h:8:0,
from C:\Users\pgrol\AppData\Local\Arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32/Arduino.h:4,
from sketch\temporaire.ino.cpp:1:
C:\Users\pgrol\AppData\Local\Arduino15\packages\chipKIT\hardware\pic32\2.1.0\cores\pic32/stdlib_noniso.h:34:5: error: initializing argument 1 of 'int atoi(const char*)' [-fpermissive]
int atoi(const char *s);
^
exit status 255
invalid conversion from 'unsigned char*' to 'const char*' [-fpermissive]