jjg / RESTduino

A sketch to provide a REST-like interface to the Arduino+Ethernet Shield
GNU General Public License v3.0
284 stars 40 forks source link

SelectedPin Token does not work for above pin 9 #5

Closed agnuca closed 13 years ago

agnuca commented 13 years ago

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

jjg commented 13 years ago

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

jjg commented 13 years ago

Closing