Add extensions
Click “Advanced” in the MakeCode to see more choices.

Search with Wukong in the dialogue box to download it.

Result
When button A is pressed, the sweeper moves forward and starts sweeping, when button B is pressed, the sweeper stops moving and ends sweeping.