evansusu
Posts: 21
Joined: Sat Apr 13, 2019 5:06 am

Lamp with light intensity sensor (raspberry pi)

Tue Jul 09, 2019 7:00 am

Any tips or codes on a lamp with a light intensity sensor on a raspberry pi which depends on surrounding light intensity? turn on when dark, turn off when dim

User avatar
B.Goode
Posts: 8045
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Lamp with light intensity sensor (raspberry pi)

Tue Jul 09, 2019 7:49 am

evansusu wrote:
Tue Jul 09, 2019 7:00 am
Any tips or codes on a lamp with a light intensity sensor on a raspberry pi which depends on surrounding light intensity? turn on when dark, turn off when dim

See the last example in Section 2.18 of the documentation for the gpiozero library: https://gpiozero.readthedocs.io/en/stab ... ght-sensor

"change brightness according to the detected light level" - 6 lines of python!

Return to “Automation, sensing and robotics”