This week's assignment was to Build and Program a smart circuit using an Arduino UNO and code blocks on tinker cad
i have got inspired by a security system project on instructable.com
https://www.instructables.com/NowGuard-Security-System
I have used the TINKER CAD platform for simulating the electronic circuit.
Arduino IDE to upload the code for Arduino.
5V Adaptor to power the arduino ,buzzer and the ultrasonic sensor
Bread Board.
Arduino UNO.
Ultrasonic Sensor
Buzzer
Jumper wires.
USB Cable.
input : ultrasonic sensor
has 4 pins (vin on volt / ground pin /tigger on pin 2 on arduino / echo on pin 4 on arduino )
out put : bazzer has 2 pins ( pin 6 on Arduino ( analogue output ) and ground)
powered the Arduino from the 5v pin from the + 5volts and the ground from the - from the breadbroad
here the block code shows when the ultrasonic detect a signal from 20 cm sets pin 6 to 150 as an analogue output
otherwise the pin 6 is low then the bazzer wont work
and here you will find the arduino code C which I converted the block code to the text code in tinkercad and put it in the IDE application
after that i uplode the code to the arduino and then use the 5 volt adaptor to power it without the computer
https://drive.google.com/file/d/1E0iBc7SzRHNxkcV9l75HVRhi04ctjQgl/view?usp=share_link
here is the final circuit showes when the ultrasonic detect object the bazzer alarm get on other wise the buzzer is off
for the first time i used ultrasonic i didnt know what is tigger and echo pins and i didnt know how to connect them on Arduino i searched on google and i found that they are pins for communications with arduino tigger send pulse and echo recieve
It was my first time dealing with the Arduino IDE. So, I got familiar with it and it will help me during working on my final project in the point of programming.
I have earned a variety of skills and knowledge in this week as follows:
Controlling several components by analogue and digital inputs.
Understanding the concept of analogue and digital output.
Getting familiar with Arduino IDE.