Arduino project: IR sensor control
This week's assignment is to build a smart circuit using an Arduino UNO which reads a signal from an input component (Sensor, Switch, or variable resistor) to control an action component (Motor, Buzzer, LED...etc) using Code Blocks.
I used Arduino project Hub to get inspiration from one of the simple projects that fit the criteria.
And I settled on doing an electrical circuit in which the IR sensor senses the infrared rays emitted by the human body and infers the presence of the human being or not by lighting the lamp.
software
materials
IR SENSOR
LED
ARDUINO UNO BOARD
Male to Female wire
The circuit consists of an IR senor and a LED , they are controlled through the Arduino.
When the IR sensor senses the infrared ray and senses the presence of any object in front of it, it gives an alarm through the LED light.
And when the body disappears, the LED goes out.
-First I built the circuit on tinker cad
Then I started writing the code as a block.
I converted the code from the block to Text in TinkerCAD and then copied it in Arduino
To be ready for uploading .
I connected the negative terminal of the LED to GND and the positive terminal to pin 13 .
As for the resistor, the first pin I connected to 5 volts, the second to GND and the third to pin 2.
Then I connected the Arduino board to the computer through the USB connection,And you uploaded the code
Then , the circuit worked.
Where when I put my hand in front of the sensor, the LED lights up and when I take it off, it turns off.
Title of Media
Laser cutter model
Laser work program