https://github.com/v1peridae/bedroom-light-automation
automating my bedroom lights + alexa support soon
https://github.com/v1peridae/bedroom-light-automation
arduino homeautomation
Last synced: 6 months ago
JSON representation
automating my bedroom lights + alexa support soon
- Host: GitHub
- URL: https://github.com/v1peridae/bedroom-light-automation
- Owner: v1peridae
- Created: 2023-12-08T20:37:49.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-08T21:07:06.000Z (about 1 year ago)
- Last Synced: 2025-04-13T14:17:47.612Z (6 months ago)
- Topics: arduino, homeautomation
- Language: C++
- Homepage:
- Size: 24.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Light Automation Using Ultrasonic Sensor and Servo Motor
This Arduino project uses an ultrasonic sensor to detect when a door is opened or closed, and moves a servo motor to turn a light switch on or off.
## Components Required
- Arduino Uno R3
- Ultrasonic sensor (HC-SR04)
- Servo motor
- Jumper wires
- Breadboard## Schematics Diagram

## Connections
- **Ultrasonic Sensor:**
- VCC to Arduino 5V
- GND to Arduino GND
- Trig to Arduino pin 9
- Echo to Arduino pin 8
- **Servo Motor:**
- VCC to Arduino 5V
- GND to Arduino GND
- Signal to Arduino pin 6## Usage
1. Connect the components as per the circuit diagram.
2. Upload the code to your Arduino board.
3. Mount the wall with ultrasonic sensor facing door.
4. Observe the servo motor movement as the door opens and closes.## Update 1:
- I made a simple 3d design for a case, I'm going to get it printed later this week and I'll add pics of it working. For now the STL is in one of the files so feel free to check it out or edit it :)