I love this week to make a automatic radar to detect obstacles enter his range. Also I think what if someone go and penetration it and cheat so I make laser security secure radar from penetration.
Tinker Cad
Arduino IDE
Arduino Uno 3
Breadboard
IR sensor
Piezo buzzer
Jumper wires
330 Ohm Resistor
LED
Ultra sonic sensor
I use 5v taking it from arduino
Title of Media
At first I draw connection and workflow on paper then, I am go to Tinkercad to test it on simulation.
I start by connecting the Ultra sonic sensor at Arduino, I was taking sensor read at 3 from echo. then connecting buzzer and led then connect IR sensor and test it. give Arduino order to turn on led and buzzer when there is obstacle detected about 10 cm or when laser is cutting.
Step 1: I am test every component to make sure it's work.
Step 2: I am just wired the circuit like how it on the Thinker cad.
Step 3: I am open Arduino , select Board as Arduino UNO, then Select the port I but, Arduino on, from tools.
Step 3: Then copy the code from Tinker cad to Arduino IDE.
Step 4: Then check it and test work of all system.
Step 5: Then verify the code, then send it to Arduino.
(you will find the code at the end of page)
Title of Media
At first I include servo library.
(also LCD because I want to print on it )
Then store the servo position at pos.
use servosweep as function copy it from examples to sweep from 0 to 180 and oppsite.
IThen write the code at void loop for Radar and laser feature.
(one block for every one).
Title of Media
I want this time to make my code as functions so am going and read about how to make function and types of return.
The second problem was the readings of the ultrasonic sensor was take time until the servo motor finish his loop, I think if we but ultrasonic code inide servo we will go over this problem.
also solution when I speak with Abd Alrahman and he till me try to using Millis.
Title of Media
Title of Media
Title of Media
Title of Media