I’ve just managed to control 2 LEDs over the internet by following the tutorial. I am using D0 and D1 on the board, but when I typed this into terminal I got a -1 response:
As soon as I changed the last statment to D1,HIGH, then D2,HIGH, both my LEDs came on and I got a 1 as a response on both occasions.
Is this something to do with this line of code:
int pinNumber = (command.charAt(1) - ‘0’) - 1;
I take it charAt(1) is looking at the character ‘1’ from “D1,HIGH”? If so why do I have to increment the number (i.e., D0 to 1, and D1 to 2)?