What is smart wardrobe

Smart wardrobe operation

Practical operation

Materials: corrugated board and cutter

Build as below picture:

Front side:

Back side:

Paste devices as below piture:

Hardware connect



Edge Connector Data Sheet


Step 1

Go to MakeCode page, click Advanced in the code block and click on Extensions.

We need to add a new codebase for programming of smart home. Finding “Add Package” in the bottom of code block and click it. Then a message box will show up, search “smart home”, and download this new codebase.

Note:If there is a hint says some codebase will be deleted because of incompatibility. Don’t worry. You could go ahead as the hint or build a new item in item menu bar.

Step 2

Drag on start from Basic and snap into set pull pin P2 to up.

Drag servo write pin from Pin, choose P7, set P7 to 180° and set door to -1 for closing the door。

Step 3

If digital read P2, the door variables will be contrary.If door variables is true, rainbow LED shows white, servo turns 0 °with door opens and pause 2 seconds.

Step 4

If door variables is false, servo turns 180° with door closes, pause 2 seconds and the rainbow LED off.


Make code:https://makecode.microbit.org/_dHPRJ93vKYVC

You also could directly download program visit website as below:


Turning of the servo will drive the door open with rainbow led light up.

Front side:

Back side:


How to make a clothes racks ?


More information