IDEATION
The idea of the project is to create a guiding light that helps the user navigate and walk through poorly lit rooms to avoid tumbling and hurting themselves.
Tools and Components Needed:
Autodesk Tinkercad for simulation of the circuit and writing the codeblocks.
Yellow LED
Arduino Uno
Jumper wires
Ultrasonic Sensors
Breadboard
Started by searching for similar projects with Ultrasonic sensors in order to understand how it's going to be connected to the circuit and its features.
After understanding each pinout i started to connect the components on Tinkercad.
LEDS connected to pins 8, 7 and 6
VCC to the +ve / 5V
Trig to pin 11
Echo to pin 10
GND to the -ve/GND
Then started writing the code on Tinkercad with Codeblocks
I set the echo pin 11 as a variable in order to get the distance readings on the serial monitor
GIF
Then downloaded the code file to open in Arduino IDE and upload to the actual circuit.
I wanted the LEDS to turn on in sequence when the distance is less than or equal 30 cm
So i made the first if else condition to LED 8 then tested
Then i duplicated the condition and and changed the pin number for each LED and made a 1 sec delay between each.
Had a problem with finding the port and board in the arduino software and then realized the cable wasn't working.
Some useful links to tutorials and projects that helped me:
https://arduinogetstarted.com/tutorials/arduino-ultrasonic-sensor-led#google_vignette
https://www.youtube.com/watch?v=0Lhgd8PQmn0