树莓派上使用 Python 编程控制 LED 教程 All In One
树莓派上使用 Python 编程控制 LED 教程 All In One
树莓派
树莓派 3B
LED
长腿正极 +
短腿负极 -
电阻
1个 220
欧姆的电阻
,目的防止 LED 被烧坏了
面包板
1个
跳线
2根公对母
的跳线
GPIO 编程
引脚
Microsoft MakeCode
for micro:bit
https://makecode.microbit.org/#editor
- Block
- JavaScript
basic.forever(function () {
basic.showLeds(`
. # . # .
# . # . #
# . . . #
. # . # .
. . # . .
`)
basic.showLeds(`
. . . . .
. . # . .
. # # # .
. . # . .
. . . . .
`)
})
- Python
def on_forever():
basic.show_leds("""
. # . # .
# . # . #
# . . . #
. # . # .
. . # . .
""")
basic.show_leds("""
. . . . .
. . # . .
. # # # .
. . # . .
. . . . .
""")
basic.forever(on_forever)
https://makecode.microbit.org/github
web usb
https://makecode.microbit.org/device/usb
Monaco Editor =>
vscode
The Monaco Editor
is the code editor that powers VS Code
.
https://microsoft.github.io/monaco-editor/
https://github.com/microsoft/monaco-editor
https://github.com/microsoft/vscode
WiFi & ip address
Fing
Network scanner
& device blocking app for Internet security
用于 Internet 安全的网络扫描仪
和设备阻止应用程序
https://apps.apple.com/us/app/fing-network-scanner/id430921107
https://play.google.com/store/apps/details?id=com.overlook.android.fing&hl=en_US
https://en.wiktionary.org/wiki/fing
一款可编程电流 LED 软灯带
Abstract
一款可编程电流LED软灯带,适用于各种广告标识牌
背光、景观轮廓
亮化等场合,此款可编程电流LED软灯带采用直流供电
、FPC双层软板结构,单块FPC双层软板为一条LED支路,多块FPC双层软板间通过硅胶导线连接,每条LED支路包含由无源器件组成的恒流驱动电路,每条LED支路含3颗LED贴片
光源,恒流驱动电路
由多元双极型晶体管BC807U与贴片电阻组成。本实用新型的有益效果是,通过增加可编程
的恒流驱动电路,可保证LED软灯带在输入电压波动
、长距离使用
等因素影响下,均能稳定工作、发光均匀,且可通过编程电流值设定LED亮度
。
https://patents.google.com/patent/CN204482079U/zh
demos
microbit-Fun-with-Radio.hex
https://makecode.microbit.org/?ICID=I-LP-CTA-MICROBIT-LAUNCH-GLOBAL-NOV-FY21-WF2226765#editor
input.onButtonPressed(Button.A, function () {
radio.sendString(":)")
})
radio.onReceivedString(function (receivedString) {
basic.showString(receivedString)
})
radio.setGroup(1)
basic.forever(function () {
//
})
def on_button_pressed_a():
radio.send_string(":)")
input.on_button_pressed(Button.A, on_button_pressed_a)
def on_received_string(receivedString):
basic.show_string(receivedString)
radio.on_received_string(on_received_string)
radio.set_group(1)
def on_forever():
pass
basic.forever(on_forever)
(🐞 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明这是一篇剽窃的文章,请访问 https://www.cnblogs.com/xgqfrms/ 查看原创文章!
refs
https://github.com/xgqfrms/fun-with-radio/
https://abc.xgqfrms.xyz/fun-with-radio/
©xgqfrms 2012-2021
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/17261187.html
未经授权禁止转载,违者必究!