Skip to content

Instantly share code, notes, and snippets.

@microkiwi
Created August 12, 2024 10:34
Show Gist options
  • Save microkiwi/4770c57607a9dc392e7994de9c0b229c to your computer and use it in GitHub Desktop.
Save microkiwi/4770c57607a9dc392e7994de9c0b229c to your computer and use it in GitHub Desktop.
[Lolin S3 Mini Pro] RGB Sequence
import s3minipro
from machine import Pin
import time
power = Pin(s3minipro.RGB_POWER, Pin.OUT, value=1)
# Red
s3minipro.rgb_led(255, 0, 0)
time.sleep_ms(250)
# Yellow
s3minipro.rgb_led(255, 255, 0)
time.sleep_ms(250)
# Green
s3minipro.rgb_led(0, 255, 0)
time.sleep_ms(250)
# Cyan
s3minipro.rgb_led(0, 255, 255)
time.sleep_ms(250)
# Blue
s3minipro.rgb_led(0, 0, 255)
time.sleep_ms(250)
# Magenta
s3minipro.rgb_led(255, 0, 255)
time.sleep_ms(250)
# White
s3minipro.rgb_led(255, 255, 255)
time.sleep_ms(250)
# Uninit
s3minipro.rgb_led(0, 0, 0)
power.value(0)
print("Howdy!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment