I'm trying to power the onboard LEDs of my Raspberry Pi 3 Model B+ using this tutorial as follows:
Firstly you need to disable the usual triggers for the built-in LEDs. This can be done from the terminal with the following commands:
$ echo none | sudo tee /sys/class/leds/led0/trigger
$ echo gpio | sudo tee /sys/class/leds/led1/trigger
Now you can control the LEDs with gpiozero like so:
from gpiozero import LED
from signal import pause
power = LED(35) # /sys/class/leds/led1
activity = LED(47) # /sys/class/leds/led0
activity.blink()
power.blink()
pause()
when I run the above code stored in onboard_led.py
, I get this error:
/usr/lib/python2.7/dist-packages/gpiozero/pins/rpigpio.py:95: PinNonPhysical: no physical pins exist for GPIO35
'no physical pins exist for GPIO%d' % number))
/usr/lib/python2.7/dist-packages/gpiozero/pins/rpigpio.py:95: PinNonPhysical: no physical pins exist for GPIO47
'no physical pins exist for GPIO%d' % number))
Is the documentation out of date, my pins don't exist, or the pins have changed?