Uploaded May 2019 | Updated September 2026, 2 weeks ago
This week on #ThursdayLearnDay, we shed some light on BOLT’s ambient light sensor. What does the ambient light sensor do? It detects the amount of light that comes in contact with the robot over a given period of time and then translates that into a measurement called lux. This allows you to program BOLT to react to static or changing lux values.
So, what exactly can you do with this awesome luminosity detector? Brilliant question. We created two simple ways to start a program.
The first way is when the lights go on. We used a loop until block along with a comparator that evaluates the value of the luminosity block. In this case, if luminosity is greater than 100 lux, the lights go on! Then it exits the loop and executes the next line of code, which causes the robots to scatter like high-tech cockroaches.
We used the same setup when you turn the lights off, but this time if the luminosity is less than 100 lux it exits the loop and executes the next line of code.
Copy what we have here and then add the rest of your code AFTER the loop until block. You'll also notice the slight delay that is added to the beginning of each of these programs. This delay allows the ambient light sensor to get the most accurate reading before evaluating the intensity of the lux value.
Turn the lights off and get your photon. Share your results @SpheroEdu!
This week on #ThursdayLearnDay, we shed some light on BOLT’s ambient light sensor. What does the ambient light sensor do? It detects the amount of light that comes in contact with the robot over a given period of time and then translates that into a measurement called lux. This allows you to program BOLT to react to static or changing lux values.
So, what exactly can you do with this awesome luminosity detector? Brilliant question. We created two simple ways to start a program.
The first way is when the lights go on. We used a loop until block along with a comparator that evaluates the value of the luminosity block. In this case, if luminosity is greater than 100 lux, the lights go on! Then it exits the loop and executes the next line of code, which causes the robots to scatter like high-tech cockroaches.
We used the same setup when you turn the lights off, but this time if the luminosity is less than 100 lux it exits the loop and executes the next line of code.
Copy what we have here and then add the rest of your code AFTER the loop until block. You'll also notice the slight delay that is added to the beginning of each of these programs. This delay allows the ambient light sensor to get the most accurate reading before evaluating the intensity of the lux value.
Turn the lights off and get your photon. Share your results @SpheroEdu!










