Skip to content

Instantly share code, notes, and snippets.


JeffersGlass/ Secret

Created Aug 30, 2020
What would you like to do?
from gpiozero import PWMLED
from time import sleep
redLed = PWMLED(20)
yellowLed = PWMLED(21)
dimmingLevel = 0
yellowLed.pulse(fade_in_time = 2, fade_out_time=.5)
while True:
dimmingLevel += 0.01
if dimmingLevel > 1: dimmingLevel = 0
redLed.value = dimmingLevel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.