Idea: " smart home music"
Through Bluetooth, when the Arduino receives 1 , infrared is on and buzzer works and servo motor rotates
when the Arduino receives 2 , buzzer is off and servo motor stop
The servo should move a welcome message to the person entering the house in addition to music from buzzer
Software :
Tinker CAD:
for circuit simulation and connection of items
Arduino IDE:
For coding and uploading code on real Arduino board
Components:
Arduino UNO board
slider switch
breadboard
jumpers
IR sensor
Servo motor
Buzzer
connecting cable (from Arduino board to laptop)
Tinker cad components
Real circuit components
Breadboard
yellow LED
IR sensor
slider switch
Jumpers
Servo motor
Arduino UNO
connection cable
Tinker cad Connection
Code blocks "as an initial guide "
Design Phase:The design of the circuit is so simple:
IR sensor ,Servo motor, buzzer on a breadboard connected with Arduino UNO board
Input component:
Slide switch
IR sensor
Action component:
Servo motor
buzzer
CODEBLOCKS Phase:
As a guide for the required code, I started with code blocks:
Slider switch on pin 8 "input"
Connected servo motor to Pin 9"output"
connected IR sensor to pin 2"input"
Buzzer on pin 3 "output"
IF .. Else condition to control slider switch (on and off), when on:
Servo moves
Buzzer works
Implementing Circuit on breadboard
After making the required connections on tinker cad and simulating the circuit. I built connection on breadboard.
Implementing The Code:
After making the required connections on tinker cad and simulating the circuit. i copied the text code to Arduino IDE
I completed the code by adding extra movement for servo
I set code lines for Bluetooth receive
I removed switch condition as it was a bit useless.
I used this app to send the numbers
Feedback:
from Saeed:
check the code as i missed if condition in a line
From Sherif:
replace LED with Buzzer
I had problems connecting Bluetooth module, especially voltage divider.
Ahmed Saeed helped me through some photos from real breadboard.
the Bluetooth module worked.
Bluetooth Module
Title of Media
Good trial as in i want to use a slider on mobile to control servo angle
helped me understand user interface of final project
Different applications of servo motor
Title of Media