Arduino with Speakers Project #01 a
Arduino with Speakers Project #01 a
Introduction
In this project the speaker will make sound whenever the infra red (IR) sensor connected to the Arduino detects any obstacle.
Elements Required
- Arduino
- Speakers
- Infra Red (IR) Sensors
- Breadboard
- Connecting Wires
Infra Red (IR) Sensors
IR Sensors work by using a specific light sensor to detect a select light wavelength in the Infra-Red (IR) spectrum. By using an LED which produces light at the same wavelength as what the sensor is looking for, you can look at the intensity of the received light. When an object is close to the sensor, the light from the LED bounces off the object and into the light sensor. This results in a large jump in the intensity, which we already know can be detected using a threshold.
IR Sensor Connection With Arduino |
Connections of IR Sensor
The IR Sensor have three pins:
- Vcc : connect to 5V of Arduino
- GND: connect to Ground of Arduino
- O/P : Output connect to I/O pin of Arduino
Output of Arduino
The Arduino gives analog values ranging from 0 to 1023.
So we will read the output on the analog pin of Arduino.
Speakers with Arduino
For connecting speakers with Arduino Read the previous blog Arduino Speakers Interface .
CONNECTIONS |
Concept of Project
When the IR sensors read the value one then it activates the Speakers and The Speakers start making sound till the Sensor Reads one at INPUT.
Code for the Project
For downloading code click here.
Feedback
Your Feedback is important please comment in the comment box if the code and the project was helpful.
Comments
Post a Comment