Hello I'm trying to work with the waveshare gsm/gprs/gps shield (B), SIM808, and trying to send a message/turn power on with no success. I've also tried GPS, but both codes for sending message and GPS coordinates don't work.
In the message part, I tried turning on the shield by an analog pin (in the schematic it says it's equivalent to the PWRKEY), but it didn't work. With that said, even when I do turn it on manually, it stays on for a very few time and it turns off after blinking for a bit.
The code I used is similar to one I found in another forum:
#include <SoftwareSerial.h>
SoftwareSerial SIM808(2, 3);
void setup()
{
pinMode(A5,OUTPUT);
digitalWrite(A5,LOW);
SIM808.begin(115200);
SIM808power();
delay(20000); //
}
void SIM808pwr()
{
digitalWrite(A5, HIGH);
delay(1000);
digitalWrite(A5, LOW);
delay(5000);
}
void sendSMS()
{
SIM808.print("AT+CMGF=1\r");
delay(1000);
SIM808.println("AT + CMGS = \"+YYYxxxxxxxxx\"");
delay(1000);
SIM808.println("message sent");
delay(1000);
SIM808.println((char)26);
delay(1000);
SIM808.println();
delay(5000);
}
void loop()
{
sendSMS();
do {
}
while (1);
}