Every one of us has a lot of things to do, and sometimes we want to scream, but we can't, so let's scream with Arduino about the delay tasks.
to build and simulate my circuit before making it IRL
Arduino IDE
upload my code to my Arduino .
To glue cardboard
To prototype the carousel
for building temporary circuits
integrated into a variety of electronic projects
measure distance by using ultrasonic waves
crocodile wires
used for making electrical connections
used to produce a tone, alarm or sound
emits light when an electric current flows through it
330-ohm resistors
limit current
to wire it all up
Open Tinkercad and click on create tab and select circuit
Use the bar on the right to search for the components Search for the first component "breadboard" then drag it
Then drag the rest of the components of the circuit
Piezo Buzzer
Arduino UNO
Led
Ultrasonic sensor
Resistor 330 ohm
first connect the positive , negative and Ground
Don't forget to connect the ultrasound sensor ,led and the buzzer to connect to the positive and negative VCC to 5v and the GND to ground
Connect ECHO to 6and the trigger to 7
put the resistor connected to the cathode (LED)
connect from the positive Buzzer to 10
connect the led (Anode) to 9
We will use if -else condition
then we will put a math to count the distance
make the input read ultrasonic distance
set pin to high then wait for 1 sec
make another if condition for the buzzer
put output play speaker and set pin
copy the text code to upload it on the Arduino
Prepare all the electric circuit components to build the circuit.
Build the circuit as designed on Tinkercad. the circuit is working perfectly.
figure out if the sensor working
Prepare all the electric circuit components to build the circuit.
Build the circuit as designed on Tinkercad. the circuit is working perfectly.
figure out if the sensor working
First, when I built the circuit, I faced the problem that I had to connect two components in the negative and positive at the same time. The solution was in the breadboard, which helped me to do that by connecting wires.
When I simulated at Tinkercad, I found that the sound was delayed. That was because I put it at first in 1 second. I tried to change it to milliseconds, but it was too fast, so I changed it to 0.1 seconds, and it is working.
When I applied that in the actual breadboard, it didn't work because I changed the direction of the buzzer.
In the final project, I need to make sure the time of the sound of the buzzer is what I want.