树莓派控制WS2812屏幕(python)

与树莓派连接


红色------5V
白色------GND
绿色-----GPIO18(树莓派第12个引脚)

代码

GitHub:git clone https://github.com/jgarff/rpi_ws281x

首先需要安装相关库:最好用pip3安装,这样python3就可以运行程序

sudo pip3 install rpi-ws281x
  •  

若没有安装pip的还得先安装pip和pip3:(装了则跳过此步骤)

sudo apt-get install python-pip3
  •  

要求-Limitations:

PWM

Since this library and the onboard Raspberry Pi audio both use the PWM, they cannot be used together. You will need to blacklist the Broadcom audio kernel module by creating a file sudo nano /etc/modprobe.d/snd-blacklist.conf with

编辑/etc/modprobe.d

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值