Hi
I have GSM SIM 900
I and I want to use it to control the LED light for example if if call the GSM one time it will turn on
and if I call it again it will go off
this is the code i use it now
#include <SoftwareSerial.h>
// Configure software serial port
SoftwareSerial SIM900(7, 8);
//Variable to save incoming SMS characters
char incoming_char=0;
void setup() {
// Arduino communicates with SIM900 GSM shield at a baud rate of 19200
// Make sure that corresponds to the baud rate of your module
SIM900.begin(19200);
// For serial monitor
Serial.begin(19200);
// Give time to your GSM shield log on to network
delay(20000);
// AT command to set SIM900 to SMS mode
SIM900.print(" ");
delay(100);
// Set module to send SMS data to serial out upon receipt
SIM900.print(" .0");
delay(100);
}
void loop() {
// Display any text that the GSM shield sends out on the serial monitor
if(SIM900.available() >0) {
//Get the character from the cellular serial port
incoming_char=SIM900.read();
//Print the incoming character to the terminal
Serial.print(incoming_char);
}
}