When you use RESTduino and use pin 13, REST format address/13/1 does not work, as strtok extrack the correct '13' token but later only last significant character '3' is use for digitial port output.
Solution:
// select the pin
// int selectedPin = pin[0] -'0'; delete this line
int selectedPin = atoi (pin); // add this line
Serial.println(selectedPin);
When you use RESTduino and use pin 13, REST format address/13/1 does not work, as strtok extrack the correct '13' token but later only last significant character '3' is use for digitial port output.
Solution:
// int selectedPin = pin[0] -'0'; delete this line int selectedPin = atoi (pin); // add this line Serial.println(selectedPin);
Regards, Agustin