This project enables an ESP32 (or compatible board) to periodically fetch scheduled time from a local Python API, compare it with the current local time, and notify via NeoPixel LED if the event is approaching.
language Pythonlanguage C++ (Arduino)Sample file JsonESP32 S3 (Board)
- ESP32 board (or similar)
- 1x WS2812 (NeoPixel) LED
- Wi-Fi access point
- USB cable, power source
- Connects to Wi-Fi and syncs time via NTP (Iran timezone GMT+3:30)
- Sends HTTP GET requests to a local Python API
- Parses time from JSON response
- If time is close (within 2 minutes), LED blinks yellow
- If connected and working normally, LED flashes green briefly
- Red and orange blinking indicates errors (Wi-Fi or API)
- Configure Wi-Fi credentials:
const char* ssid = "USERNAME-AP"; const char* password = "PASSWORD-AP";
- Simple Flask server returning time as JSON:
from flask import Flask, jsonify
app = Flask(__name__)
@app.route('/time')
def send_time():
return jsonify(hour=18, minute=35) # Update manually or from DB
if __name__ == '__main__':
app.run(host='0.0.0.0', port=44555)- Install Flask:
- (
Windows)
py -m pip install flask- (
Linux)
pip install flasknpx json-server --watch time.json




