relevant code;
while(Serial.available())
{
c = Serial.read();
if(c < '0' || c > '9') return;
S_buffer[iReceived++] = (char)c;
}
iValue = atoi(S_buffer);
The buffer is defined as;
char S_buffer[] = "000";
If I send "142" to the code, iValue is returned as 142, ok no issue there, but I want to be able to send a string from "60" to "600". So what do I need to change in the code so when I send "63" iValue is 63 and when I send "432", i Value is 432?
As it is now, I have to send "063" to get iValue to equal 63.