menu_book Course Curriculum (Raspberry Pi) expand_more
Linux & Setup
GPIO Digital I/O
Sensors & Buses
Automation
Networking & Services
PWM LED brightness
Learn PWM LED brightness in Raspberry Pi with a dedicated explanation, a concept-specific example, practical cautions, and a mastery check.
12 min read
•
Beginner
Advertisement
raspberry-pi-014.py
python
from gpiozero import PWMLED
from time import sleep
led=PWMLED(18)
for value in [0.1,0.4,0.8,1.0,0.0]:
led.value=value; sleep(.3)
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content