the idea of this week's assignment is to build and Program a smart circuit using an Arduino UNO which reads a signal from an input component to control an action component.
This week we got to work with the ultrasonic sensor and we made a cool project which you can see in the "š®" section. I wired the component even though it was my first time ever dealing with it, and I wanted to make sure I get its idea, the wiring, and how it works so I decided to reuse it in this assignment with a different component.
The idea is basically simple, the led will turn on when the sensor senses any object at a certain distance.
Material:
-Mini breadboard.
-Jumper wires.
-Green LED
-Resistor 220u.
-Arduino UNO.
-Ultrasonic sensor.
I used Autodesk Tinkercad for circuit simulation.
and Arduino IDE to copy the text code and upload it to Arduino UNO.
Designing steps:
-First, I connected the Ultrasonic sensor and the LED with the Arduino and used code blocks to simulate the action.
-Then I used the code blocks which indicates that the led will turn on if the object is in a distance less than 25 cm.
Then I copied the text code which I got from Tinkercad to Arduino IDE and uploaded it on the Arduino.
First, I connected the circuit as I did in the simulation.
Then I tested the Ultrasonic sensor and it worked as in the simulationš„³
Because we dealt with the sensor in the EOW practice, our instructor Amany was a great help to us to understand how the sensor works and how it detects objects, which made it easier for me to work with the sensor in the assignment.
I also found this reference where I got the connection of the Ultrasonic with Arduino.
And used this tutorial to know how to build the code blocks for the sensor.
Actually, this project was a way out from the original one which I intended to do.
since the suggestion was to make something from the final project I decided that I'm going to use the keypad as an input, but we had to use code blocks only this week, and all the references I found were in text, so as I was running out of time trying to figure this out, I switched because you can't always get what you wantš
I learned a lot about simulation, which is an essential step in order to make the final project, and got to understand more how the Arduino works and the difference between input and output pins.
this week we got to make two cool projects, waving hand using servomotor, and the triggering input was once the potentiometer or the manual mode, and then the Ultrasonic or the automatic mode.