Professional Documents
Culture Documents
with Arduino
*============================ EG LABS
===================================//
Demonstration on how to receive an SMS using GSM module
The circuit:
LCD:
* LCD RS pin to digital pin 12
* LCD Enable pin to digital pin 11
* LCD D4 pin to digital pin 7
* LCD D5 pin to digital pin 6
* LCD D6 pin to digital pin 5
* LCD D7 pin to digital pin 4
* LCD R/W pin to ground
* 10K resistor:
* ends to +5V and ground
* wiper to LCD pin 3
* LED anode attached to digital output 9
* LED cathode attached to ground through a 1K resistor
GSM:
RX PIN OF GSM TO TX0 PIN OF ARDUINO
SHORT THE GROUND PINS OF ARDUINO AND XBEE
============================== EG LABS
===================================*/
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 7, 6, 5, 4);
// give the pin a name:
int led = 9;
// incoming serial byte
int inByte = 0;
void setup()
{
pinMode(9, OUTPUT);
lcd.begin(16, 2);
lcd.print("ENGINEERS GARAGE");
lcd.setCursor(0, 1);
lcd.print(" GSM SMS ");
delay(1000);
break;
else;
lcd.write ( inByte );
}
}