argaar/ttgo-lora32-v2-ttn-tracker ? reverse-engineered prompt

Reverse engineered prompt

Build me an ESP32 GPS tracker for the TTGO LoRa32 v2.0 that sends location data to The Things Network and can also work with TTN Mapper.

I want it to read GPS from a NEO 6M, show status on the small OLED screen, check battery voltage, and be smart about power so it only sends when the device is moving and can go back to deep sleep to save battery. It should use the LoRaWAN setup for TTN, with a clear way to set the region and my device credentials, and it should be easy to compile and upload with PlatformIO.

Please make it work for the v2.0 board pin mapping, and include the GPS and battery handling that the project needs. If anything depends on current library settings or TTN docs, look them up online if needed. I’d like the finished code to be ready to flash, with sensible defaults and comments where I might need to change pins or keys.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab