the assignment is: Build and Program a smart circuit using an Arduino UNO which reads a signal from an input component (Sensor, Switch, or variable resistor) to control an action component (Motor, Buzzer, LED...etc) using Code Blocks
I care about this idea because I like the Ultrasonic sensor and the idea of Movement detection
Ultrasonic distance sensor
Arduino Uno
Breadboard
Buzzer
jumper wires
LED
Resistor
I started creating the circuit by placing & connect Arduino & breadboard together.
Then I added an Ultrasonic sensor to the breadboard & linked it to the Arduino.
After that, I added one led with separate resistors & connected it to the Arduino.
After that, I added Buzzer & connect its anode & cathode pins to the Arduino.
and I added another if condition to control the buzzer and make it read the output of the ultrasonic sensor.
which is mean when the ultrasonic sensor reads something in the range of 100mm the led will turn on.
and when it read something in the range of 50mm the buzzer will turn on.
I started to build the circuit the same as the tinkercad Circuit and test it
then I took a copy of the written code from tinkercad and put it in Arduino IDE after I connected the Arduino to the laptop and load it .
it takes a lot of time for me to adjust the write range for the ultrasonic sensor in reality and after many trials, I adjusted it by changing it to 20 cm to make the led lights, and 10 cm to active the Buzzer
By this week I KNEW many different new components and I can almost read the code and understand it
The waving hand exercise
The lather medal stretching activity