πŸ”” 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

    Screenshots:

    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!

    Wappsto APP view

    The light level is at 81, this means that we have detected light!
    Therefor the alarm is triggered which you also can see in the APP!

    Learn together with Wappsto:bit

    Start experimenting with fun projects

    

    Contact by phone

    (0045) 46 922 722

    ξ₯

    Contact by email

    Wappstobit@Seluxit.com