Skip to content
PaulPioPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

IOT

Personal IoT projects for ESP32 and Raspberry Pi.

ESP32

Project Description
Sketch_02_1_ButtonAndLed Hold button to turn LED on (GPIO 13 → GPIO 14)
button_and_led_with_states Toggle LED on/off with button clicks
Sketch_04_1_BreathingLight PWM fade in/out on GPIO 13 (breathing effect)
WebServerBlinkLight Wi-Fi web server to control an LED from a browser
WebServerTempHumidity Wi-Fi web server + /api JSON for DHT11 (Pi dashboard polls this)
MotionDoorbell Freenove CAM + PIR: motion alerts + /capture + /stream for Pi Telegram bot
Sketch_25_1_Infrared_Motion_Sensor PIR on GPIO 14 controls LED on GPIO 13
shut_down Placeholder sketch

Button and LED (toggle)

Click once to turn the LED on, click again to turn it off. Button on GPIO 13, LED on GPIO 14.

Breathing Light

External red LED on GPIO 13 (P13) with a current-limiting resistor to GND, on the Freenove ESP32 GPIO extension board.

Breathing light wiring

WebServerBlinkLight

Control the LED from a browser over Wi-Fi. Open the ESP32's IP address to toggle the light on and off.

LED on LED off
Web server with LED on Web server with LED off

Setup

Copy the example secrets file and add your Wi-Fi credentials:

cp ESP32/WebServerBlinkLight/secrets.example.h ESP32/WebServerBlinkLight/secrets.h

Edit secrets.h with your network SSID and password. This file is gitignored and will not be pushed.

WebServerTempHumidity

Serve DHT11 temperature and humidity on a simple web page (auto-refreshes every 5 seconds). Sensor on GPIO 13. Full setup, power notes, and Tailscale steps: ESP32/WebServerTempHumidity/README.md.

Power: After flashing once, plug the ESP32 into a USB wall charger / power outlet (or any 5V USB source). It does not need to stay connected to your PC — only power and Wi-Fi.

Graphs / history: Use the Pi dashboard (polls http://<ESP32-IP>/api).

Setup

cp ESP32/WebServerTempHumidity/secrets.example.h ESP32/WebServerTempHumidity/secrets.h

Edit secrets.h with your network SSID and password (or copy secrets.h from WebServerBlinkLight). Flash the sketch, open Serial Monitor at 115200 baud, and note the printed IP address. On home Wi-Fi, open http://<ESP32-IP>/ on your PC or phone.

Remote access (Tailscale subnet router)

Advertise the LAN through Tailscale on the Raspberry Pi Zero 2 W at 192.168.1.64 (Pi-hole-friendly flags):

sudo tailscale up --advertise-routes=192.168.1.0/24 --accept-dns=false

Approve 192.168.1.0/24 in the Tailscale admin console, then open http://<ESP32-LAN-IP>/ with Tailscale connected. See the project README for IP forwarding and full steps.

Raspberry Pi

Project Description
temp-humidity-dashboard Polls ESP32 /api, stores history in SQLite, charts + date filter + °C/°F
motion-doorbell CAM snapshots/clips + dedicated Telegram bot (commands + motion alerts)

See RaspberryPi/temp-humidity-dashboard/README.md for the temp dashboard (http://192.168.1.64:5000/).
Motion doorbell: RaspberryPi/motion-doorbell/README.md (http://192.168.1.64:5100/ + Telegram bot).

Hardware notes

  • External LED on GPIO 14 (avoids conflict with the built-in LED on GPIO 2)
  • Button on GPIO 13 with internal pull-up

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages