Hi, please everyone for advice. I built a simple GPS speedometer. And the display doesn't show me any data. I use the seven -segment display TM1637 and Neo M6 GPS and Arduino NANO. Can you please see the code if I am not there for a mistake? I am a beginner in programming.
Thank you
/* arduino nano
displej jsem pouzil 4mistny TM1637. rychlost vic nez 100km/h , na dvoumistny jsem nenasel knihovnu
GPS modul aktualizuje 1Hz. podle datasetu umi az 5Hz, ale jeste jsem nenasel zpusob jak to zmenit
casem na to prijdu a pujde to aktualizovat. 1Hz mi prijde dostatecny, ani tachometr v aute se tak rychle neaktualizuje.
*/
#include <TM1637Display.h>
#include <TinyGPSPlus.h> // ve spravci knihoven Arduino IDE
#include <SoftwareSerial.h> // ve spravci knihoven Arduino IDE
static const int CLK = 3, DIO = 4; // gpio pripojeni na displej mozno zmenit
TM1637Display displej(CLK, DIO);
static const int RXPin = 6, TXPin = 7; // gpio pripojeni na gps mozno zmenit
TinyGPSPlus gps;
SoftwareSerial ss(RXPin, TXPin);
void setup() {
displej.setBrightness(10); // nastaveni jasu (8-15) podle potreby se musi zmenit
ss.begin(9600); // rychlost soft serial nelze zmenit
}
void loop() {
if (ss.available()) { // prisli data z GPS na ss port?
gps.encode(ss.read()); // dekodovat gps vetu
if (gps.speed.isUpdated()) { // jsou aktualizovana data rychlosti?
displej.showNumberDec(gps.speed.kmph(), false); // zobrazi rychlost na displeji. pocatecni nuly vynechany
}
}
}
I've been using a Nano, Neo6M and TM1637 as a working speedometer in my car for a couple of years. I've had plenty of difficulties with it -- both hardware and software. But they can all be resolved.
Like others on this forum, I'm happy to help you but only if you help us to help you.
First thing to do is post a photo of your setup. You might not think this is important but it really is.
Maybe I found the cause of the problem. I put the boards under a large magnifying glass and found one chip on the GPS board. I do not have a hot air soldaker for repair, so I have ordered a new module so far.
I'm currently using the same GPS module. Yours does look a bit skewed. It is surprising that one leg is not soldered down. But you say that the LED is blinking -- that's a good sign. You need to look at the raw GPS output to see if it is working. Too early to worry about getting the speed.
Looks like you do 3D printing. That's a serious looking power supply. Sooner or later the antenna's tiny cable will break if you leave it loose like that. Never connect or disconnect the antenna cable with power on. Never.
Yes. I 3D print a lot of tools, including the power supply. This build is for revival. As soon as the whole set is functional, it will go into the printed box.
First of all, to eliminate hardware possibilities try using the example code that comes with the GPS library. There should be a 'DeviceExample' sketch under tinyGPSplus in the examples.
Customise line 8 in that sketch to use your Tx and Rx pins, then load it into your Arduino and open the serial monitor at 115200 baud.
You should see text messages on startup, and regular updates as new data comes in from the GPS. If you're getting that, then you know the hardware works.