fork of Mini NTP ESP32 to run on Heltec Wifi
  • C++ 45.1%
  • C 32.9%
  • HTML 20.5%
  • CSS 1.5%
Find a file
Mike Alger 70d9aad9fd move all the headers to the include folder
probably should be that way in a bigger project
2022-04-28 11:05:31 -04:00
Firmware move all the headers to the include folder 2022-04-28 11:05:31 -04:00
.gitattributes Initial commit 2019-04-15 13:28:45 +02:00
.gitignore changes to make this work on heltec in 2022 2022-02-28 13:57:06 -05:00
COPYING Added License GPLv3 for the code 2020-06-03 07:28:13 +02:00
README.md more notes 2022-03-02 01:06:30 +00:00

Notes

this Repo is a fork of the original project and adapts the previous work to work with a heltec ESP32 wifi kit with builtin screen.

the original project made use of different pins (for wemos lolin 32?) and i have opted to fix all the hardcoded pin values i can find to be paramaterized at the begining to easily adapt it to a different board.

i am using a GT-U7 GPS module , heltec Wifi kit V2 and a lithium ion cell and have ommited the RTC for now the pins used in my configuration

I²C:

GPIO PIN Function
GPIO 15 SCL
GPIO 04 SDA
GPIO 04 oled reset

GPS:

GPIO PIN Function
GPIO 13 UART RX
GPIO 02 UART TX
GPIO 26 PPS Interrupt

buttons

GPIO PIN Function
GPIO 0 screen select (label prg on board)

Getting started

you probably just need to clone this repo, and build in platform io it should pull all the required libs for you. make sure you have the root of your project be at the firmware folder i should have tidyd that up to but didn't want to change much incase i need to adapt this to push back to the original project

it will likely boot loop untill you load in the file system image so make sure you navigate to and run

  1. platformio -> project tasks helteck wifi kit 32_v2 -> Platform-> Build Filesystem Image
  2. platformio -> project tasks helteck wifi kit 32_v2 -> Platform-> Upload Fileystem Image

details if you are using something different can be found at something ike https://randomnerdtutorials.com/esp32-vs-code-platformio-spiffs/

Future plans

i may add additional screens (number sats in view quality of fix a blank screen ) and revise how the screens are handled (big old messy function in the main.cpp )

ORIGINAL Writeup

180662 mini NTP with ESP32

License: GPLv3

Firmware for Elektorproject 180662 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Firmware for Elektorproject 180662.  If not, see <https://www.gnu.org/licenses/>.

Code for the GPS based NTP with ESP32. This software uses a Wemos LoLin ESP32 OLED as base. The OLED used is a SSD1307 based one attached to the i²C Bus. This board can be purchased at ( https://www.elektor.com/wemos-lolin-esp32-oled-module-with-wifi ). As GPS receiver this one is used in the build ( https://www.elektor.com/open-smart-gps-serial-gps-module-for-arduino-apm2-5-flight-control )

Software

The software is written using the arduino framwork for the ESP32. Also you need to compile the code following libraries to be present:

Compile and upload the code to your ESP32. Also upload the webpages.

GPIO Mapping

For the GPIOs used these are not the arduino default ones, as they needed to be modified for the OLED. The following pins are used:

I²C:

GPIO PIN Function
GPIO04 SCL
GPIO05 SDA

GPS:

GPIO PIN Function
GPIO13 UART RX
GPIO15 UART TX
GPIO25 PPS Interrupt

For more inforamtion have a look at: https://www.elektormagazine.com/labs/mini-ntp-server-with-gps