Lunch Box Alarm

by rochae in Living > Kids

29 Views, 0 Favorites, 0 Comments

Lunch Box Alarm

IMG_6159.jpg
IMG_6153.jpg

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

IMG_6141.jpg

Pseudocode Design Brief

Happy

IMG_6151.jpg

At night the light level should be low. If the light level is low then the micro;bit will display a happy face.

Sad

FMSXTG0M1NLF89A.jpg

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

IMG_6154.jpg

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

IMG_6156.jpg

Micro;bit will then instruct my son to press A button

Arrow

IMG_6157.jpg

Arrow will display is he doesn't know where the A button is.

Go to Sleep

IMG_6158.jpg

The micro;bit will then display "Go to sleep." The attached light will turn on as the script is being displayed.

Reset

FBS8ORJM1NLF8M9.jpg

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.