Systems like Home Assistant do tell you if it is day time or night time based on your physical location on the earth, but sometimes it is good to check just how much light you are actually getting on your home. This is typically part of a local weather station that can tell you if the sun is shining or it is overcast.
We will be using a photocell (light dependent resistor) to read the analog value of ambient light outside of your Mini Smart Home.


One side of the photocell will get connected to 3.3v in the Signal I/O section of the Crickit.
The other side of the photocell should be connected to the Signal 1 pin on the Crickit as well as to a 10K ohm Resistor.
The other end of the Resistor will connect to the GND pin on the Crickit.
I used a Tiny Breadboard to make this connection easy, but there are other ways to build this sensor if you want. Just be sure that the connections are correct.
You may want this to be on the roof of your Mini Smart Home so that you always know if the sun is out or not.
Page last edited March 08, 2024
Text editor powered by tinymce.