Cyrus is a very sleepy hamster. In fact, Cyrus is almost always sleeping.
1. From the Basic category, find show icon [ ] and snap it into your on start container. Set it to show the asleep -__- face.
In the show icon dropdown menu options, you can hover to see what each design is called!
Pressing Cyrus's logo tickles them!
2. From Input, find the on logo [pressed] container and drag it into your workspace.
3. Go to Basic and grab another show icon [ ]. Snap it into your empty on logo [pressed] container. Set the icon (Cyrus's face) to happy.
4. From the Music category, get a play [melody jump up] [in background] and add it to the bottom of your on logo [pressed] container. Change the playback mode to [until done].
Whenever Cyrus is shaken, they get sad ☹️
5. From Input, find on [shake] and drag it into your workspace.
6. From the Basic category, grab show icon [ ] and snap it into your new on [shake] container. Set the icon (Cyrus's face) to sad.
7. From the Music category, find the play [melody dadadum] [in background] block and add it to the bottom of your one [shake] container. Change the playback mode to [until done] .
8. Click on the dropdown and set it so Cyrus plays a sad sound until done.
Let's ensure that Cyrus will always go back to sleep after being shaken or tickled.
9. Right click the show icon[-_-] block in your workspace (inside the on start container) and choose Duplicate.
10. Snap your copied block in at the very bottom of your on [shake] container.
11. Duplicate the show icon[-_-] block again and this time snap it in at the very bottom of your on logo [pressed] container.
Check out the simulator and make sure your speakers are on 🔊
Play with Cyrus to see how they react
Click on the SHAKE button to shake Cyrus.
Touch the gold logo at the top to tickle Cyrus.
If you have a new micro:bit (the one with the shiny gold logo at the top), download this code and try it out!