Introduction: LinkitONE SMS Powered LED

Hello,

Here I will show you how to power a LED using SMS.

Step 1: Parts

You will need-

1 x LinkitONE

1 x SMS antenna

1 x LED

1 x Breadboard

Step 2: Attaching the LED

Here we’ll attach the LED to the LinkitONE

Connect it to the D9 pin of your board.

Step 3: Attaching the SMS Antenna

Attach the SMS antenna to your board and then give power to your circuit.

Step 4: ​Adding a Battery Pack for External Power

We will attach the battery to Linkit so that we can use it anywhere.

Step 5: Code

Burn this code to your board-

#include<LGSM.h>

void setup()

{

pinMode(9, OUTPUT);

boolean notConnected = true;

while(!LSMS.ready())

delay(1000);

}

void loop() {

String msg;

while(true)

{

msg+=LSMS.read();

}

if(msg.equalsIgnoreCase("1"))

digitalWrite(9,HIGH);

else if(msg.equalsIgnoreCase("0"))

digitalWrite(9,LOW);

}

Step 6: Turning LED On

Now SMS ‘1’ from your mobile. You will see the led light up.