Saturday, August 23, 2008

Arduino&LED experiment

Infrared sensor is used as a button to control the LED to swich on and off. So that in my installation the sensor will sense the paper when they come out from the printer and send the data to Arduino. The image below shows the circuit board of infrared sensor. Use the 2 points of sound speaker as inout and output plug into the pin2 and GND on Arduino board.
Arduino & LED testing...

LED blinking code:


The input leg of infrared sensor goes into pin2 and output leg goes into GND.


After several experiments on the Arduino & LED, finally got the input and output in the right pin position. At last, the LED was controlled well by the Arduino which was blinking once each time the LED was switched on.

No comments: