the assignment was to design GUI with processing
i used week 7 assignment but removed the servo and worked with the buzzer
Softwares: Tinkercad to simulate the circuit before phisically doing it
processing
Arduino IDE
Materials:
Breadboard, Arduino, Sensor photoresistor module,Jumper Wires, switch,buzzer
Processing
Tinkercad
Sensor
servo buzzer
I Connected The Sensor to GND 5V and pin 5
I Connected The buzzer to GND 5V and pin 3
Programmed the Arduino
Tested on TinkerCad
I used the old arduino code for the buzzer
initially i wanted to make it as previous assignment when the button is on and the sensor iis on the buzzer works
and when the sensor is off even if switch is on it is off
as in simulation video on tinker cad
it was working right but when i changed is to use serial errors occured
i think the problem is in while loop i tried different solutions it didn't work will post viedo on flip grid as soon as possible
simulation on tinker cad
Connection on Tinker Cad
video without sensor
i used the old servo code and added new condition for the switch
Code without sensor
code with sensor
I connected the circuit as in tinker cad
uploaded the code from arduino
i had a problem in arduino code which was similar to one of my peers we tried to find a solution together but we ended changing the code "'D
I started the assignment late which made have no time for try and errors so others should avoid this:(
i guess the final project should have Arduino So this week Knowledge will be used
how to use libraries
the push button exercise :'D