We’re going to remotely open the cookie jar using another Circuit Playground Express. This doesn’t work as well as the micro:bits because the Circuit Playground Express devices need to be in sight of each other.
On the cookie device we need to open the jar, setting the Lock to false for 5 seconds then set it to true.
Expert level here is to allow someone to eat a cookie without giving them the password, hmmm….
It’s easier than it sounds! Here’s the cookie code:
Now it’s going to receive a radio message from another micro:bit to unlock it. All we need is the radio code to unlock the cookie jar for 5 seconds and then lock it again.
Don’t forget to setup your radio in the on start block!