Skip to content

Latest commit

 

History

History
52 lines (36 loc) · 1.51 KB

File metadata and controls

52 lines (36 loc) · 1.51 KB

Hollow Clock Agent Notes

Build

Install the ESP8266 core before compiling:

arduino-cli core install esp8266:esp8266 \
  --additional-urls https://arduino.esp8266.com/stable/package_esp8266com_index.json

Compile with:

arduino-cli compile --fqbn esp8266:esp8266:nodemcuv2 \
  --additional-urls https://arduino.esp8266.com/stable/package_esp8266com_index.json \
  /home/uniqueding/Workspace/hollow_clock_wifi

Flash

Detect the board port with:

arduino-cli board list

Upload with:

arduino-cli upload -p /dev/ttyUSB0 --fqbn esp8266:esp8266:nodemcuv2 \
  /home/uniqueding/Workspace/hollow_clock_wifi

If upload requires sudo, root also needs the ESP8266 package index and core installed:

sudo arduino-cli core install esp8266:esp8266 \
  --additional-urls https://arduino.esp8266.com/stable/package_esp8266com_index.json

Then upload with:

sudo arduino-cli upload -p /dev/ttyUSB0 --fqbn esp8266:esp8266:nodemcuv2 \
  --additional-urls https://arduino.esp8266.com/stable/package_esp8266com_index.json \
  /home/uniqueding/Workspace/hollow_clock_wifi

Config

WiFi credentials, NTP server, timezone, and optional static IP settings live in config.h. The NTP server default is ntp.aliyun.com. The timezone values are UTC_OFFSET_HOURS and UTC_OFFSET_MINUTES, and China Standard Time is 8 hours and 0 minutes. Static IP mode uses USE_STATIC_IP with STATIC_IP_ADDRESS, STATIC_IP_GATEWAY, STATIC_IP_SUBNET, STATIC_IP_DNS1, and STATIC_IP_DNS2.