Hey guys, sorry its not really related to TTN topic. but I do have a problem with my TBeam.
the problem that I have right now is before this i have got the “GPS fix” for the tbeam but the problem is date is no where near the true value.
this picture is for today which is 14/7/2022 but from the picture shown its 31/12/2099, the time is correct because for my country is GMT +8.
ignore the location because right now I’m put it indoor
I’m using tinygps++ library and following the example given:
I actually have asked this in forum from GitHub and they said I have to just put my sensor outside so I can get “GPS fix” but more than 8 hours but still not getting the date right. only the date is problem, other else is fine
before this I get the GPS fix, but I only get correct coordinate, time and number of satellite but not for date. it just same before this as you can see in the photo.
Given that the battery is at -4% and as a perfect example of why GitHub Co-Pilot’s AI will only propagate the variable quality of code that people post, I’d say the code is in some serious need of auditing.
I’m following from example show for oled display code and using tinygps++ lib for the NEO-6M GPS module
I’m using the function just for the display only, or i am wrong for using those library? may i know how you get them display?
Shame you did not display the actual code you were using (all of it) earlier since I have no experience of using that particular SSD1306 library.
The U8x8lib library makes using the display easy, no need for all that String stuff, in summary the code I have for displaying the date on a TTGO OLED is;
uint8_t day, month;
uint16_t year;
day = gps.date.day();
month = gps.date.month();
year = gps.date.year();
My first reaction is yes, it’s wrong to show some of the code - because if you can’t fix it, how do you know which bit to show us??
So the assignment to a variable like Second but then the use of a function like second() just seems like some hacking and the array as string, shudder.
But despite your best ‘bro’ hinting at giving us all the code, I don’t think you are any further forward.
Perhaps put some serial debug output so you can see what’s actually going on?
However, the (eventually) provided display driving functions seem way over complex, simple print() commands will work both for the display and serial debug output.
Why all that String stuff is needed I have no idea; there may well be some minute in detail that the (eventually) provided code which is causing an output format error.
Not sure the TTN forum is an appropriate place for providing support for Arduino libraries when simple to understand code alternatives are available.
Inclined to agree, CopynPasta of nearest random code to top of Google has been a bane of my life for the last few weeks but I’m now free & clear of that project.
Hopefully @ezzat can take some time out to debug the code / find alternatives, perhaps even use LMIC-node which drives the display but will need TinyGPS patching in. Or look at the more reliable web resources for such things.