the assignment was to Program an Arduino UNO to read a signal from a multiple inputs component and multiple outputs
I wanted to upgrade last week music box idea by adding switch and buzzer
http://fabacademy.org/2020/labs/talents/students/doaa-allshureih/weeks/week11.html
Softwares: Tinkercad to simulate the circuit before phisically doing it
Arduino IDE
Materials:
Breadboard, Arduino, Motor, Sensor photoresistor module,Jumper Wires, switch,buzzer
Tinkercad
Tinkercad
Sensor
servo motor
servo buzzer
First I googled how to plat tones in Arduino
I found pre made tones to use
i used one close to music box musicand began to edit its code to fit my project
Dc Motor Problem
I Connected The servo to GND 5V and pin 4
I Connected The Sensor to GND 5V and pin 5
I Connected The switch to GND 5V and pin 2
I Connected The buzzer to GND 5V and pin 11
Programmed the Arduino
Tested on TinkerCad
Connection on Tinker Cad
i used the old servo code and added new condition for the switch
servo Code
combination of tones and servo and condition
simulation Video
I connected the circuit as in tinker cad
uploaded the code from arduino
circuit
this week
in the first exercise of the week it was fun seeing others talking that it worked from the first time while i was spending 6 hours doing it :'D
I didn't know all the components in the Kits so I used Google to define which was which
i guess the final project should have Arduino So this week Knowledge will be used
how to use libraries
the push button exercise :'D