jjg / RESTduino

A sketch to provide a REST-like interface to the Arduino+Ethernet Shield

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SelectedPin Token does not work for above pin 9

agnuca opened this issue · comments

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);

Regards,
Agustin

Thank-you for the tip Agustin, the change has been committed.