In this topic I will explain how the hoa-serie infrared sensors work with Arduino.
This the circuit of the infrared sensor with Arduino:
So all we need to install this circuit is:
Arduino
HOA-serie Infrared Sensor
100 Ohm Resistor
10 KOhm Resistor
Connection Wires
BreadBoard
LED
560 Resistor
You can find the code in my Github:
int analogInPin = A5; // Analog Pin that read the values from the sensor
int ledPin =13; // Pin that control the led to turn on and off.
int sensorValue = 0; //Initial value for the sensor value
void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
}
void loop() {
// read the analog in value:
sensorValue = analogRead(analogInPin);
Serial.print("sensor = " );
Serial.println(sensorValue);
delay(200);
if(sensorValue>600)
{
//turn on the Led
This file has been truncated. show original
How this type of Infrared work:
This type of infrared sensor use to calculate the rotation of motor and maybe in other ways.
How this Circuit Work:
You can see this video below to find how to install the circuit and it's work.
Video link:
If you have any question let me know.
admin@zachariabouzid.cf
This the circuit of the infrared sensor with Arduino:
Please post as an image in line, or on your github page.
Guide to posting images
Please remove the link to the shared file. Most people on this forum will be extremely suspicious of it, and I certainly won't follow it.