Last active
March 31, 2022 01:30
-
-
Save kawashimaken/c4b0572955aa6e65fa6387fe6cb2c000 to your computer and use it in GitHub Desktop.
How to test your M5SticV RGB LED
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from modules import ws2812 | |
from fpioa_manager import * | |
# 6 --> red | |
# 7 --> white | |
# 8 --> blue | |
# 9 --> green | |
fm.register(6) | |
class_ws2812 = ws2812(6,130) | |
r=0 | |
dir = True | |
while True: | |
if dir: | |
r += 1 | |
else: | |
r -= 1 | |
if r>=255: | |
r = 255 | |
dir = False | |
elif r<0: | |
r = 0 | |
dir = True | |
for i in range(130): | |
a = class_ws2812.set_led(i,(0,0,r)) | |
a=class_ws2812.display() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When you can not run the sample code here: https://docs.m5stack.com/en/quick_start/m5stickv/maixpy
try the above.
For firmware : M5StickV_Firmware_v5.1.2.kfpkg