This week Assignment
Design and program a smart device that perform a certain function or solve a problem: program Arduino UNO to read signals from multiple input components (Sensor, Switch, or variable resistor) to control multiple action components (Motor, Buzzer, LED...etc) using Arduino C (Text Code).
inspired by
This week we were assigned to Design, simulate, and build a simple electronic device that performs two actions.
Arduino uno and wire
LDR sensor
breadboard
jumpers wire
buzzer
switch on/off
fac
code explain :
in void setup
pin 8 input (LDR sensor )
pin 9 output ( buzzer )
pin 11 input ( faswitch on/off )
pin10 output(fac)
in void loop
if digital read 8 high then analog 9 ,170 (if we put hand in
ldr sensor the buzzer will make sound
delay
if analog write 9,170
else analog write 9,0
if digital read pin 11 high then analog write pin 10 high ( when we switch on the (on/off switch ) Fan is on
delay
else analog write pin 10 low
PIR instead of LDR sensor on tinker cad because there is no LDR on tinkercad
LDR sensor - buzzer - motor and switch on/off
LDR sensor to ground and power and pin 9
buzzer - to ground + to pin 8
The challenge this week is to write and understand the Coding ,
The instructors helped me understand that we start the code with void setup by defining ( input and output ) and then in void loop we put the code that we want to run repeatedly
the challenge this week is the ability to put more than input and output .
Title of Media
Title of Media
Title of Media