Problem: Not all AirLift examples display statuses' with the individual GRB LEDs on the AirLift.
Question: How to access those LEDs when other CircuitPython code does not to show statuses'.
Solution:
Code: Select all
import adafruit_rgbled
from adafruit_esp32spi import PWMOut
GREEN_LED = PWMOut.PWMOut(esp, 25) # Top
RED_LED = PWMOut.PWMOut(esp, 26) # Mid
BLUE_LED = PWMOut.PWMOut(esp, 27) # Bottom
status_light = adafruit_rgbled.RGBLED(GREEN_LED, RED_LED, BLUE_LED)
G1, R1, B1 = 0, 0, 0
status_light.color = (G1, R1, B1) # Turn all LEDs OFF
print("Up")
for x in range(255):
status_light.color = (x, x, x)
time.sleep(0.001)
print("Down")
for x in range(255, 0, -1):
status_light.color = (x, x, x)
time.sleep(0.001)
print("End")