32. Case 30: The Ambient Lighting#

32.1. Purpose#


Make an ambient lighting.

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

32.3. Materials Required#


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

32.4. Bricks build-up#


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

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

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

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

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

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

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

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

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

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

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

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

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

../../_images/Wonder-Building-Kit-step-case-30-15.png

../../_images/Wonder-Building-Kit-step-case-30-16.png

../../_images/Wonder-Building-Kit-step-case-30-17.png

../../_images/Wonder-Building-Kit-step-case-30-18.png

../../_images/Wonder-Building-Kit-step-case-30-19.png

../../_images/Wonder-Building-Kit-step-case-30-20.png

../../_images/Wonder-Building-Kit-step-case-30-21.png

../../_images/Wonder-Building-Kit-step-case-30-22.png

../../_images/Wonder-Building-Kit-step-case-30-23.png

../../_images/Wonder-Building-Kit-step-case-30-24.png

32.5. Software Platform#


MakeCode

32.6. 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-30-04.png

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

Result#

When button A is pressed, the four Rainbow LEDs of the Wukong breakout board will light up. Pressing button A again, the color will change; and when button B is pressed, all LEDs are off.