Created
August 12, 2024 10:34
-
-
Save microkiwi/4770c57607a9dc392e7994de9c0b229c to your computer and use it in GitHub Desktop.
[Lolin S3 Mini Pro] RGB Sequence
This file contains hidden or 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
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