Http Get Help

01 Aug 2012

Hi I am using the http client to get text from a url. The only thing on the text will be a '1' or '0' so when the text is '1' I want to be able to turn on an led.

I am able to print the text to the serial monitor but just dont know how use what is in the text to control the led.

Any help would be much appreciated.

Emmet

01 Aug 2012

Sounds like you need to look into the switch statement.

Have a look at the following for some ideas http://mbed.org/forum/mbed/topic/3746/?page=1#comment-18737

You could also use If Then Else.

Also http://mbed.org/handbook/DigitalOut shows simply turning LEDs on/off.