i have tried interfacing of gsm 900 module with Arduino uno
after reading some tutorial on the internet i found that sending "AT" as an AT command will give OK as a Result by the GSM Module
so i tried to send AT serially But I did not received any OK
heres my code
i did noticed that something is received as LED on pin 8 glows once
but why the recieved character cant be seened on lcd or either on the serial monitor screen????
Moderators note: please use code tags for pieces of code
after reading some tutorial on the internet i found that sending "AT" as an AT command will give OK as a Result by the GSM Module
so i tried to send AT serially But I did not received any OK
heres my code
Code:
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
int led = 8;
// incoming serial byte
int inByte;
void setup()
{
lcd.begin(16, 2);
// initialize the led pin as an output.
pinMode(led, OUTPUT);
// start serial port at 9600 bps
Serial.begin(9600);
// wait for a while till the serial port is ready
delay(100);
// send the initial data once //
Serial.print(" AT");
}
}
void loop()
{
// if we get a valid byte, read analog ins:
if(Serial.available())
{
// get incoming byte:
inByte= Serial.read();
Serial.write(inByte);
lcd.print(inByte);
// send the same character back to serial port
// blink the LED once //
digitalWrite(led, LOW);
delay(100);
}
else
digitalWrite(led, HIGH);
while(1);
}
but why the recieved character cant be seened on lcd or either on the serial monitor screen????
Moderators note: please use code tags for pieces of code
Last edited by a moderator: