Skip to main content

Case 26: The Corsair

Purpose


Make a corsair.


micro:bit Wonder Building Kit

Materials Required


Bricks build-up


Hardware Connection

Connect a servo to S1 port on Wukong breakout board.

Software Platform


MakeCode

Coding


Add extensions

Click "Advanced" in the MakeCode to see more choices.

Search with Wukong in the dialogue box to download it.

Program

Link:https://makecode.microbit.org/_VrPehd4athgo

Result

When the micro:bit is powering on, it displays a heart icon. When button A is pressed, the corsair begins to swing; when button B is pressed for the second time, the swing amplitude increases, the third time press the A button amplitude and the swing goes to the maximum, the fourth time press the A button, swing amplitude has change; when the button B is pressed, the swing amplitude begins to decrease, when repeatedly pressed B button in three times, it stopped swinging.