Microbit sun exposure timer
This project is about building a device that measures how long you have been in the sun. This is very important in Australia because of the ozone layer. They always tell us in school to reapply sunscreen every 2 hours but I am using this project for a coding challenge.
After testing the code in the sun and indoors I set the brightness limit to 250. When the reading is below 250 it will not count.
This project uses the onboard LEDs as a brightness sensor. The detects all kind of light, not only ultra-violet which is the real danger, but it still helps me prove the idea. A real product should use an UV sensor and be more compact.
This is the code. It uses a variable to count how many seconds you have been under the sun. The Micro:bit warns you with a sound if it has gone over the time limit, so to run this code you will need a Micro:bit version 2.
After testing the code in the sun and indoors I set the brightness limit to 250. When the reading is below 250 it will not count.
Pressing button A shows you how long you have been in the sun. Once you reapply sunscreen you need to press button B to restart.
The time limit is the amount of seconds before the warning. Don't forget to change it to suit your needs
My idea was to wear this device on the hat so I designed a custom platform for the Micro:bit with a clip so that it can be attached to any hat. I designed the platform with Tinkercad and printed it in the Prusa printers at the Edge in the SLQ in Brisbane. This is a photo of the platform when it finished printing.
If you are interested in printing it or modifying it for your own use you can download the files in Thingiverse here: https://www.thingiverse.com/thing:6204993
And this is a photo of the finished project attached to a hat
In this video you can see the sun monitor in action
It would be fun if all kids in school were wearing this device and they all started beeping at the same time.
Comments
Post a Comment