Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
Hello, can someone tell me where I am going wrong with this code:-
void remotecontrol() {
myled=!myled;
timeout.attach(&attimeout, 0.2); /* time out after 200ms */
remaction=atoi(remcon);
printf("%d\n\r",remaction);
wait_ms(100);
}
I send a string printf("9631\n\r") and am expecting remaction to have the value 9631, but, it always evaluates to 0.
Confusing.