Вы находитесь на странице: 1из 3

9/12/2019 Microsoft MakeCode for micro:bit

WorkBetter

https://makecode.microbit.org/#editor 1/3
9/12/2019 Microsoft MakeCode for micro:bit

on start

show leds

forever

if button A is pressed then

while not button A+B is pressed

do
if button A is pressed then

show number temperature (°C)

else if button B is pressed then

show number temperature (°C) × 33.8

else

show string " C|F "

clear screen

pause (ms) 500

else if button B is pressed then

while not button A+B is pressed

https://makecode.microbit.org/#editor 2/3
9/12/2019 Microsoft MakeCode for micro:bit

while not button A+B is pressed

do
if button A is pressed then

show number compass heading (°)

else if button B is pressed then

show number acceleration (mg) x

else

show string " Com|Acc "

else

show string " A|B "

Extensions
radio, *

https://makecode.microbit.org/#editor 3/3

Вам также может понравиться