33. Case 31: The Drawing Machine#

33.1. Purpose#


Make a drawing machine.

../../_images/Wonder-Building-Kit-case-31-01.png

33.3. Materials Required#


../../_images/Wonder-Building-Kit-step-case-31-01.png

33.4. Bricks build-up#


../../_images/Wonder-Building-Kit-step-case-31-02.png

../../_images/Wonder-Building-Kit-step-case-31-03.png

../../_images/Wonder-Building-Kit-step-case-31-04.png

../../_images/Wonder-Building-Kit-step-case-31-05.png

../../_images/Wonder-Building-Kit-step-case-31-06.png

../../_images/Wonder-Building-Kit-step-case-31-07.png

../../_images/Wonder-Building-Kit-step-case-31-08.png

../../_images/Wonder-Building-Kit-step-case-31-09.png

../../_images/Wonder-Building-Kit-step-case-31-10.png

../../_images/Wonder-Building-Kit-step-case-31-11.png

../../_images/Wonder-Building-Kit-step-case-31-12.png

../../_images/Wonder-Building-Kit-step-case-31-13.png

../../_images/Wonder-Building-Kit-step-case-31-14.png

33.5. Hardware Connection#

Connect two motors to M1 and M2 ports on Wukong breakout board.

../../_images/Wonder-Building-Kit-case-31-06.png

33.6. Software Platform#


MakeCode

33.7. Coding#


Add extensions#

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

../../_images/Wonder-Building-Kit-case-21-02.png

Search with Wukong in the dialogue box to download it.

../../_images/Wonder-Building-Kit-case-21-03.png

Program#

../../_images/Wonder-Building-Kit-case-31-04.png

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

Result#

Use the leather band to fix the pen on the gray double bolt parts, the drawing machine is placed on a piece of white paper, when the button A is pressed, the drawing machine begins to draw. By adjusting the speed of the motor M1 and motor M2, you can draw different patterns; when the button B is pressed, the drawing machine stops.