|
楼主 |
发表于 2022-7-11 17:04
|
显示全部楼层
【花雕体验】18 行空板点亮WS2812B的256位LED硬屏
行空板测试外接执行器模块——Mind+代码编程
测试程序三十:行空板逐个点亮64位LED
实验接线:行空板P21口接WS2812B的IN端
- #【花雕体验】18 行空板点亮WS2812B的256位LED硬屏
- #行空板测试外接执行器模块——Mind+代码编程
- #测试程序三十:行空板逐个点亮64位LED
- #实验接线:行空板P21口接WS2812B的IN端
- from pinpong.extension.unihiker import *
- from pinpong.board import Board,Pin
- from pinpong.board import NeoPixel
- import time
- Board().begin()
- my_variable = 0
- np1 = NeoPixel(Pin((Pin.P21)),64)
- while True:
- if (my_variable < 64):
- for my_variable in range(0, 64):
- np1[my_variable] = (0,5,0)
- time.sleep(0.1)
- if (my_variable < 64):
- for my_variable in range(63, -1, -1):
- np1[my_variable] = (5,0,0)
- time.sleep(0.1)
- if (my_variable < 64):
- for my_variable in range(0, 64):
- np1[my_variable] = (0,0,40)
- time.sleep(0.1)
复制代码
|
|