The assignment of this week is to 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 want to design a smart light that could produces light when some thing get close to it so it could help any one to study and when we go far away from it,it could turn off.
Simulator online program
Bread board
Jumpers
Arduino uno
220 ohm resistor
White LED
Ultrasonic sensor
I used tinker-cad "online simulator program" to draw and test the circuit.
Then I used the program to make the blocks of the code.
I let the Arduino to take the read of trigger pin 3 and echo pin 2
Condition:
If the distance less than or equal 6 cm the LED which connected to pin 9 will turn on
If this condition is not found the Led will turn off.
I connected the circuit as in the tinker cad .
I sent the code to Arduino cc to test the code. and upload it to the Arduino uno.
https://drive.google.com/file/d/1MaBSf0DlUkUh-ElP2XZpEvDsqdh3alAO/view?usp=sharing
I had a problem during uploading any code to the Arduino I tried many times and didn't find any solution.
My instructor Maram helped me and we fin that the problem was in the connecting cable of the Arduino and by changing the cable it works.
From what I have learnt in this week I could connect some sensors and build a blocks.
Title of Media
Title of Media