case 04 Show Box for Stickers
7. case 04 Show Box for Stickers#
Make a show box for stickers you like.
1 x basic kit 1 x Cardboard 1 x Hot melt glue gun 1 x Scissors 1 x Handmade knife
What is a show box for your stickers?#
Do you want to show your lovely stickers to others ? Let’s make a show box for stickers.
How does it work?#
When micro:bit is received signal detected by crash sensor by basic:kit board, the servo turns and the door of show box opens.
7.4. Practical operation#
Prepare a handmade knife, a hot melt glue gun, a scissors and a piece of cardboard.
Set up as below：
Set and stick components as below.
Prepare your lovely stickers and stcik them as below.
Thread wires through the hole of front side.
7.5. Hardware connect#
Connect servo to P1, crash sensor to P2 and battaries pack to micro:bit. (as below)
Under “on start”，set pull pin P2 to up to keep signal stable. Set servo write pin P1 to 180, then the sticker board is at rest.
Set door as a variable, and its initial value is false for saving status of sticker board.
Under forever, snap if statement to judge if the P2 port is equal to 0, it means if the sensor switch is pressed.
When the value P2 port is equal to 2, the sensor switch is pressed, set variable door to not door.
Then, snap another if statement to control the value of varible door, which means to judge the status of the door. If variable door is equal to true, then the sticker board will move(P1=0).
When the value of P2 is not equal to 0, the sensor switch is not be pressed.
Then, the sticker board is at rest(set P1 to 180).
Please refer to detail programming：https://makecode.microbit.org/_0JmTbLKuXA8s
You also could directly download program visit website as below:
Press the crash module, your stickers begins to moving.
How to show more stickers to your friends？