🔔 Candy alarm!
It’s time to secure your precious belongings 🍭🍫🍬
with a drawer alarm!⏰
Watch how Simon uses the Wappsto:bit to catch Heather stealing his candy!
And then it’s time to build your own alarm, to secure your candy 😊
This is a 📒 Skilled project, if you find it too hard or too easy, you can always return to the projects overview and try another project 🙂
In this Wappsto:bit Academy project we will build a candy drawer alarm, using the light level sensor on the micro:bit
This alarm will will let you know on Wappsto if the alarm is triggered, while it sounds an alarm to scare off intruders!
We will be using 5 elements in this pretty advanced code:
- On start: Set up values and crank up the volume
- Forever: What state is the alarm in?
0 = OFF1 = Alarm will turn ON if it sees light (keep in a dark drawer)
2 = ON
- On String Value (16) received from Wappsto: Activate or deactivate your alarm from Wappsto
- On button A pressed: Start the alarm in 5 seconds
- On button A+B pressed while the micro:bit logo is also pressed: turn off the alarm
What are you going to protect? And how would you improve the code?
Get it on MakeCode
Wappsto APP view
The light level is 0, and the alarm is armed but not triggered. This means we are ready for action! 🙂 You can also see that the “Desired state” is 1, which is how the Alarm was Armed!
Don’t Miss Out on Awesome Projects and News
Stay in the Loop and Join our Newsletter!
Learn together with Wappsto:bit
Start experimenting with fun projects
Contact by phone
(0045) 46 922 722
Contact by email