Get the latest tech news

Two ways to use an LED as a light sensor with Arduino


I needed to log when a light switched on and off during the night as part of debugging an oddly behaving movement sensor. To do that I built...

I needed to log when a light switched on and off during the night as part of debugging an oddly behaving movement sensor. To do that I built a really simple light sensor logger using an Arduino Leonardo, a large LED and a resistor or three. The main loop() just reads the voltage across the LED from analog input A1 and writes it to the serial port.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Ways

Ways

Photo of LED

LED

Photo of Arduino

Arduino

Related news:

News photo

Six ways to prepare for Shadow of the Erdtree - from someone who's played it

News photo

NVIDIA Exploring Ways To Better Support An Upstream Kernel Driver

News photo

Relative Evaluation Report on S1, iPhone (2010) [pdf]