ESP8266 operation

tasmod:
Just a thought, in your block settings for the toggle switch are your button labels as per example?

They should be 0 and 1 as these are the characters passed. They are passed as characters "0" and "1" which the 'atoi' converts to numbers 0 and 1

If you used ON/OFF instead they will evaluate to 0 as that isn't what is expected by the 'atoi' line.

I sussed that out earlier and did not have time to post a reply to you. When I realised what the atom was doing, I changed the data that google sends to 0 and 1.

Many thanks for taking the time to post, it is much appreciated on this steep learning curve.

You may be able to help further, if you don't mind? In the sketch the pins used are 6,5,2,and 1, Relay1 works on pin D12/MSIO/D6, Relay2 works on pin D13/SCK/D5, relay3 works on pin D14/SDA and Relay4 does not work on any of the pins. Any ideas on what other pins are controllable from the ESP8266? Photo of board attached.