Skip to content

Instantly share code, notes, and snippets.

@kawashimaken
Last active March 31, 2022 01:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kawashimaken/c4b0572955aa6e65fa6387fe6cb2c000 to your computer and use it in GitHub Desktop.
Save kawashimaken/c4b0572955aa6e65fa6387fe6cb2c000 to your computer and use it in GitHub Desktop.
How to test your M5SticV RGB LED
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()
@kawashimaken
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment