Warning to KiCad Users: Avoid all links to kicad - pcb.org – Use kicad.org
Starting Electronics needs your help! Please make a donation to help cover our hosting and other costs. Click the donate button to send a donation of any amount.
Created on: 2 August 2012
A tone will be played on the loudspeaker that will change pitch as the light intensity levels on the LDR change. Moving your hand around the LDR will cause the light intensity to change. The value from the LDR is read on the Arduino analog pin A0. This value is displayed on the Arduino serial monitor window.
File → Examples → 2.Digital → tonePitchFollower
The circuit diagram and breadboard connections can be found on the tonePitchFollower page on the Arduino website.
Select File → Examples → 2.Digital → tonePitchFollower in the Arduino IDE to open the sketch for this project. Upload the sketch to the Arduino board.
If you would like to see the values that are being read on analog pin A0 of the Arduino, then open the serial monitor from the Arduino IDE. Move your hand around the LDR and hear the pitch played on the loudspeaker change.
Can't see the video? View on YouTube →