Photoresitor

Experiments & prototyping with the Arduino.
rwblinn
Site Admin
Posts: 211
Joined: 07 Oct 2017, 12:16

Photoresitor

Postby rwblinn » 08 Oct 2017, 18:24

Determine the darkness by reading a Photoresitor output value.
The result is a value between 0 and 1023 (10bit) which is mapped to a value between 0 and 123 (7bit).

Parts Needed
• 1x Arduino UNO
• 1x Photoresistor
• 1x 10k Resistor

Wiring
Arduino = Photo Resistor
GND = GND (Black)
5v = VCC (Red)
A0 = Signal (Yellow)
(Wirecolor)

Circuit
Image

Download Source Code

ToDo
• Set the brightness of a white LED, if getting dark (link the level of darkness to the LED Brightness between 0 - 255).

Version
20160518

Return to “Arduino”

Who is online

Users browsing this forum: No registered users and 1 guest