Closed AEK-BKF closed 7 years ago
NeoSWSerial gps_port(0, 1);
You shouldn't use NeoSWSerial
on a HardwareSerial
port. These are the pins for Serial
. If your GPS device is connected to pins 0 & 1, just use Serial
. I assume that the GSM shield is also connected to pins 0 & 1, because the AT commands are also sent with Serial
. You can't have two devices connected to the same serial pins, unless one of them is transmit-only and the other is receive-only.
While the GPS could be used as a transmit-only device (Arduino receives), the GSM shield both receives (commands) and transmits (status).
How is everything connected?
Thanks for quick reply :)
I'll ask again:
How is everything connected?
Both of these boards have jumper blocks to select the pins to be used for the serial ports.
I set : SoftwareSerial serialGps(0, 1); SoftwareSerial serialSim900(7, 8);
Pins 0 & 1 are for the HardwareSerial
port, called Serial
. DO NOT use this:
SoftwareSerial serialGps(0, 1); NO!
Instead, for the code above, use this:
#define gps_port Serial
Then use this for the GSM connection:
NeoSWSerial sim900( 7, 8 );
Also update your sketch to use gps_port
for reading into NeoGPS (the gps
object), and use sime900.print
for the AT commands.
Hi man :) I hope you're fine ^^ please help me to resolve my problem ! I have Arduino Uno 3 , Sim900 GSM and GPS modules, I used your program bellow :
I get on serial console :
But I can't receive the sms on my phone ! Thank you so much.