I'm making a silly little mess of a device for rental karting. A little magnetic doodad you can shove on the wheel that displays your current speed or lap_delta, and log to an sd-card as a backup.(or if you just want speed and wanna check laps later).
I was using aollin's examples on a Seeed NRF52840 and merged both of the examples together with an SD card reader.
Everything was working perfectly until i added one of these little 1106 oled displays, my gps rate drops randomly to 1hz. I noticed dropping the number of monitor channels fixed a lot of these issues but not entirely. Same with stripping every GPS message, and only sending GGA every 10packets. Is it possible to slightly reduce the rate at which messages are sent back to the device for the monitor portion?
On the otherhand i've never used one of these oleds before, is there a faster library than the adafruit one (i only need text)? Can i do a "partial refresh" instead of clearing the display every time?
Comments
To actually answer your question, I'm using the example code this person proved as a base as that was insanely helpful. I'm using the race Chrono diy GPS AND Monitor functionality (but not can)
https://github.com/aollin/racechrono-ble-diy-device
This certainly ended up being a mostly me issue. I'm really pushing the chip I chose, the seeed nrf52840.
Basically here's a dev note for any other devs.
So I'm trying to do... Too much. (RaceChrono gps and monitor, and SD logger)
I wanted to log to an sdcard as a backup if I didn't want to use my phone during a kart race (rental league).
I ended up chasing a lot of things, rewrote my entire oled display code to do partial updates, and only when there is new data. This helped... And reconfigured my GPS to only export NMEA data (ublox parsing might be faster...) And only the required messages to function. This also helped.... But It really ended up being my sdcard logging. The sdfat2 library seemed to work much faster, but it was really how often I was flushing the SD card. Setting up the SD card to flush once a minute, and also when I swap pages as a backup, put everything back to 10hz locked (yes I know the m8q does 18hz but baby steps).
Here's a stupid quick "hey it works", did some testing on my scooter and I seem to be getting a solid 10hz now with logging/(gps)speed/(rc)best lap/(rc)delta lap. I'll be able to test on a kart tomorrow I think
https://youtube.com/shorts/hSUgxIDJ8Ro?feature=share
https://youtube.com/shorts/12WlfR0PNEk?feature=share
Gps: ublox sam-m8q
Mcu: Seeed nrf52840
Display: 0.96in i2c OLED
Storage: 3wire SPI SD card reader
I wish I could wrap my head around the math required to do lap timings on the chip and only use race Chrono after the race, but maybe I can find a smaller phone to stick in my pocket...... Will race Chrono work on one of those $50 "prison phones"?? I found a couple in amazon super cheap as the only have 3g modems
I did manage to make a lap timer... made a library for it too...
https://github.com/TheAngryRaven/DovesLapTimer
my brain now wants to explode.
In no way shape or fucking form does this replace RC, i just didn't want to keep a phone in my pocket while in a kart. Does NOT handle splits or managing different tracks, that's your job. it quite literally only handles current/last/best/pace. i do not wish to add any other features, fork it if you want them.
now i can watch my pace in qualifying, then check my driving after the race thanks to logging via SD card.