In this Raspberry Pi light sensor tutorial I show you how to correctly connect the photo resistor sensor up to the GPIO pins. Lastly I show you how it can be used in a simple python script so you’re able to gather and use the data from it.
This is yet another sensor that I will be looking at incorporating into future projects such as a light activated alarm clock.
I explain a bit further down each of the parts that I will be using in this circuit. Be sure to read up on it if you need more information on these. It is important to note for this tutorial I am just using a simple photocell sensor whilst these are perfect for some tasks they might not be as accurate as you would like.
Each Friday is PiDay here at Adafruit! Be sure to check out our posts, tutorials and new Raspberry Pi related products. Adafruit has the largest and best selection of Raspberry Pi accessories and all the code & tutorials to get you up and running in no time!
Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7:30pm ET! To join, head over to YouTube and check out the show’s live chat and our Discord!
Python for Microcontrollers – Adafruit Daily — Python on Microcontrollers Newsletter: A New Arduino MicroPython Package Manager, How-Tos and Much More! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi
EYE on NPI – Adafruit Daily — EYE on NPI Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey