In this recipe, we will learn how to create a loop that will repeatedly read the current light brightness from the light sensor. Getting live readings from the sensor can be a fun way to experiment with the sensor to see how sensitive it is to different light sources.
Ultimately, the techniques in this recipe can help you build projects that interact with their environment, depending on the presence or absence of light.