I’m running DietPi on my RockPis and I find it is fantastic.
However, I cannot install libmraa
Anybody tried periphery?
So far I am able to get the LED and GPIO to work but I am having problems with PWM.
Below is what I was able to get working with the LED and GPIO:
from periphery import LED, GPIO, PWM
led0 = LED(“rockpis:green:power”, True)
led1 = LED(“rockpis:blue:user”, True)
gpio_out = GPIO(80, “out”) # ‘80’ is the GPIO number They all work.
The example for PWM does not work and can’t figure it out, it gives “OSError: [Errno 19] No such device”.
The documentation shows it requires two Parameters:
- chip (int ) – PWM chip number.
- channel (int ) – PWM channel number.
While the GPIO is asking for:
- line (int) – GPIO line number.
- direction (str) – GPIO direction, can be “in”, “out”, “high”, or “low”,
It would be great to have it working for my new project, I really don’t want to install an Arduino to take care of this…