Skip to content
/ insect Public

Smart ESP32-S3-based controller that displays time-based alerts via NeoPixel and allows dynamic pin control. Open-source and customizable β€” contributions are welcome (with credit). Please respect copyright.

Notifications You must be signed in to change notification settings

ama-dox/insect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

πŸ–ΌοΈ ESP32 S3 Image

IMAGE_DESCRIPTION IMAGE_DESCRIPTION

⏰ Time Sync Alert with NeoPixel (ESP32 + Python API)

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.


πŸ“¦ Project Structure

  • language Python
  • language C++ (Arduino)
  • Sample file Json
  • ESP32 S3 (Board)

πŸ”Œ Hardware Requirements

  • ESP32 board (or similar)
  • 1x WS2812 (NeoPixel) LED
  • Wi-Fi access point
  • USB cable, power source

🎯 Features

  • 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)

🧠 Arduino Sketch (main.ino)

  • Configure Wi-Fi credentials:
    const char* ssid = "USERNAME-AP";
    const char* password = "PASSWORD-AP";

🐍 Python API (app.py)

  • 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 flask

βš™οΈ Setting up a sample json file (Node.js)

npx json-server --watch time.json

🧩 Check Status LED ESP32 S3

  • Normal mode of the device: IMAGE_DESCRIPTION

  • The device is not connected to the network: IMAGE_DESCRIPTION

  • Device data receiving mode from API: IMAGE_DESCRIPTION

  • Promised time mode: IMAGE_DESCRIPTION

About

Smart ESP32-S3-based controller that displays time-based alerts via NeoPixel and allows dynamic pin control. Open-source and customizable β€” contributions are welcome (with credit). Please respect copyright.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published