Clone the repository with submodules.
git clone --recurse-submodules git@github.com:hmil/espong.git
cd espong
Chose one of three options to build the firmware:
Get your firmware online at https://nodemcu-build.com/.
Chose the following settings:
- Branch: master
- Modules: ADC, bit, file, GPIO, i2c, net, node, SJSON, timer, UART, U8G2, WiFi
To build and flash the firmware, you'll either need Docker or a have the tools to build a nodemcu firmware.
Connect your nodemcu and boot it in flash mode. Then run:
# Build in Docker:
make flash
Connect your nodemcu and boot it in flash mode. Then run:
BUILD_FIRMWARE_IN_DOCKER=false make flash
Reboot your chip and wait a minute for the initial setup to complete. Then upload the lua scripts.
To upload the lua files, run:
make upload
ℹ️ The makefile remembers which files were uploaded to nodemcu and only uploads the files that have changed. If you connect a different nodemcu with the same serial port, then you'll want to clean the cache with
make clean
You can specify a custom serial port with the PORT
environment variable.
For instance:
PORT=/dev/cu.usbmodem1234 make upload
NodeMCU pin | Connects to | Function |
---|---|---|
3v3 | oled vcc | screen power |
gnd | oled gnd | screen ground |
D6 | oled scl | iic clock |
D5 | oled sda | iic data |
D2 | btn up | Up / OK button |
D3 | btn down | Down button |