i'm confused with extracting a part of a char array, please i need help:
char * Test;
Test = "1082";
i want to extract the number contained in the variable Test (1082), without the "", it can be from 3 numbers to 5, i tried many commands in C++ but i always get an error or wrong result.
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
char * Test;
Test = "1082";
int val = atoi(Test);
Serial.print("val = ");
Serial.println(val);
}
void loop() {
// put your main code here, to run repeatedly:
}