Lunch Box Alarm
I prep my kids lunch the night before. I created an alarm to stop my son from eating his lunch the night before.
Supplies
Micro;bit , lunchbox, light
Pseudocode
Pseudocode Design Brief
Happy
At night the light level should be low. If the light level is low then the micro;bit will display a happy face.
Sad
If my son wakes up late night and starts looking for his lunch box with his flashlight, the light sensor will notify the micro;bit of the light level. The micro;bit will display a sad face. This will hopefully deter my child from opening his lunch box.
Alarm
If lunch box is opened the micro;bit will sense the tilt/movement. The micro;bit will then sound the alarm. It will display the script "Not Now" twice while an alarm in the background is going.
A
Micro;bit will then instruct my son to press A button
Arrow
Arrow will display is he doesn't know where the A button is.
Go to Sleep
The micro;bit will then display "Go to sleep." The attached light will turn on as the script is being displayed.
Reset
The alarm will reset at the end and display the happy face one more time as the light level should go back down.
Video Example
Attached is a video example of how it works. I could only uploaded in 480p because the file couldn't be bigger than 25mb. Sorry for the bad quality.
Downloads
Self Reflection
For this project I decided to go with an alarm. I wanted to make a project with the microbit that I can use at home. My alarm uses an external LED light to let my son know it is time to go back to sleep. The alarm will hopefully prevent him from eating his lunch the night before. One thing that I am really proud of my project is that it is interactive. It will give my son several chances to make the right choice. For one I use the microbit light sensor to display a happy face if its little to no light. If someone turns on the light the light sensor notifies the microbit and turns the happy face into a sad face. Hopefully that alone will deter him from eating his sweet lunch time snacks the night before. One issue I had was turning the LED off. As soon as I connected the LED to the positive and ground wires, it would light up. I eventually figure it out by using the advanced blocks. Thanks to Carol I did a small change in my project. Initially one of the scripts the microbit displayed said "Danger." Carol suggested I change the wording since it would be used on my son, a young child. I ended up changing the script to display "Not Now." If I was to do this project on Python I would have to write my code in snake_syntax_style.