led controlled via sms

hi !

we need your help with our arduino and sim900a .we’re a beginner about this project .can u help us to make our project successful???any help appreciated

this code is copied in these forum .but we dont know if it is working .so pls help us!!!

testing.ino (2.39 KB)

What is the problem? Did you test your code? Apparently, the code waits for an incoming SMS. The SMS must begin with '#' then 'a' (for the first led, maybe later you will control several leds), then

  • '0' to switch the led off
  • '1' to switch it on
  • 'S' to send back an SMS telling the led's status.

This last point must be changed, as for now the SMS does only contain 'LED STATUS: ON' whatever the status. You should change

 SIM900.println( " LED STATUS: ON ");                         // message to send


 if (led_status) SIM900.println( " LED STATUS: ON ");                         // message to send
  else SIM900.println( " LED STATUS: ON ");                         // message to send


void sendSMS(char led_status) {              //SEND SMS


void sendSMS(int led_status) {              //SEND SMS

But I can't test your code because I don't have a SIM900 module. I don't know if the way you manage the serial communication with the module is robust. You should read some tutorial (there is a good one here)