What is the idea?
You might know that a LED emits light when you put the right amount of volts on the right leads. The funny thing is that it also works the other way around. Not the leads, it doesn't work when you put the leads the other way around. But what does work is that when you shine light on a LED it will GIVE current. It is a very small current but just enough for an Arduino to detect.
What will it do?
When you darken the sensor led, for instance by covering it with your hand, it will turn on the other LED.
Does this work with any LED?
As far as I know, it works with any LED, but not with any LED as good.
green and red LEDs seem to work best.
If trough experimenting you find out that other colors even work better, let me know.
Does it work with any light?
This sketch works very reliable with normal daylight. It is not fully tested in dark rooms or bright sunlight yet.
Step 1: You will need
- an Arduino board (Uno, Duemilanove or something like that)
- two LEDs
You will need no tools.
You do need a computer with the Arduino software installed and a USB-cable to connect the Arduino board. (But if you have an Arduino board, you probably have that sorted already)