Hi all, Im new to Arduino and the forms so if I mess anything up as far as formation or the like goes just let me know and ill fix it.
I have been working on a recent project where I'm trying to use a GT-U7 GPS module to display basic GPS info (lat, long, altitude, date, time, and satellite count) to a small OLED screen. One small thing to note is that the screen in the diagram has an SCK pin whereas the screen I'm using has an SCL instead. When I have used this GPS with test code it has been able to display GPS info to the serial monitor. When I have it hooked up to the screen simply displays all zeros for the values even though the GPS will have a blinking red light, indicating it has a connection to a satellite. I have tried adding code that tells it not to display anything until the GPS updates but even when the light flashes on the GPS it displays zeros. It's pretty simple wiring and I have tested all the components so I am sure they work, so I'm assuming it's a coding issue. I have included the code file so let me know if you have any ideas.
Which Arduino are you using? Pins 0 & 1 are generally reserved for uploading and serial monitor connection. They should never be used with SoftwareSerial.
The reason you are not getting any data appears to be because you are not using using TinyGPS++ correctly.
Make sure that the simple example in the TinyGPS++ library works with the serial monitor and SWSerial before trying to use the display.
Don't use pins 0 & 1 for software serial... they are used for the serial monitor.
Given you are using a Mega it has multiple hardware serial ports... you don't even need to use software serial. Anyway for now just try using pins other tham 0 & 1 and see if you get some data.
Looks like you are talking to the display OK... it the connection to the GPS that is the problem.
Im using a mega 2560, I've switched the pins, RX is now 10 and TX is now 11 and the same problem persists it's been sitting outside with the new pins for over a half hour.
First off thank you for the help, I ran this exact code and it displayed the GPS start message in the serial and it hasnt done much else, the light on my GPS is blinking indicating it does have a connection.
void loop() {
if (!serial_connection.available())
return; // No characters to process
if (!gps.encode(serial_connection.read()))
return; // No new message received.
// A new, complete message has arrived from the GPS
// Now we might have data to display!
Serial.println("Satellite Count:");
Serial.println(gps.satellites.value());
I'm afraid I don't understand, I pasted the bit of code right after the void loop command and it is inside of the brackets. Could you be more specific on where I should put it?
-Thanks