How to use micro:bit V2 to control built-in sensors All In One

xgqfrms / 2023-05-18 / 原文

How to use micro:bit V2 to control built-in sensors All In One

micro:bit V2 & Python

image

image

MakeCode

MakeCode for micro:bit

https://makecode.microbit.org/

https://www.microsoft.com/zh-cn/makecode

Adafruit Circuit Playground Express

https://makecode.adafruit.com/

https://learn.adafruit.com/makecode/

$24.95

https://www.adafruit.com/product/3333

image

image

image

demos

  1. LED 💡
def on_forever():
    basic.show_icon(IconNames.HEART)
    basic.clear_screen()
    basic.pause(500)
    basic.show_icon(IconNames.SMALL_HEART)
    basic.clear_screen()
    basic.pause(500)
    basic.show_icon(IconNames.HEART)
basic.forever(on_forever)

basic.forever(function on_forever() {
    basic.showIcon(IconNames.Heart)
    basic.clearScreen()
    basic.pause(500)
    basic.showIcon(IconNames.SmallHeart)
    basic.clearScreen()
    basic.pause(500)
    basic.showIcon(IconNames.Heart)
})

image

  1. 蓝牙 🟦🦷

  1. 指南针 🧭 & 加速度计 🚀

  1. 麦克风 🎤

  1. 扬声器 🔉

TB

image

image

https://item.taobao.com/item.htm?id=680961800265

refs



©xgqfrms 2012-2021

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!