Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- kml
- bem10jfx.blogspot.com
- #define SIM800_TX_PIN 9
- #define SIM800_RX_PIN 10
- //Create software serial object to communicate with SIM800
- SoftwareSerial serialSIM800(SIM800_TX_PIN,SIM800_RX_PIN);
- void setup() {
- Serial.begin(9600);
- delay(1100);
- serialSIM800.begin(9600);
- delay(1100);
- Serial.println("iniciando");
- serialSIM800.write("AT\r");
- }
- void loop() {
- if ( serialSIM800.available()){
- Serial.write( serialSIM800.read());
- }
- //Envio de comandos AT para o modulo
- if (Serial.available()){
- serialSIM800.write(Serial.read());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment