Code it in MakeCode Maker — image 1 of 1

leds_MakeCode1.png
details

The on touch blocks are found in the INPUT menu.

Selecting "down" means the touch pad indicated is registering a touch. "Up" means it is not being touched.

Here, they are used to make the D0 pad into an on/off switch that controls the onboard RGB light on and off.

So, when you touch pin D0, the light turns purple. Let go, and the light turns off!

Back

Search