craftbeerpi / craftbeerpi4

GNU General Public License v3.0
132 stars 84 forks source link

Suggestion: gpiod instead of rpi.gpio #113

Open Kalilovisky opened 1 year ago

Kalilovisky commented 1 year ago

Dear all, I know the project idea is to work only with Raspberry Pi. However, to be more inclusive of other single-board computers, such as Banana Pi or Orange Pi, wouldn't it be better to use the gpiod library instead of rpi.gpio?

avollkopf commented 1 year ago

Please note, that active work on craftbeerpi4 is currently only done in this repo/organization: https://github.com/PiBrewing/craftbeerpi4

Anyhow, I was looking into this earlier, but don't see an easy way to use gpiod as it does not seem to have PWM functionality and other functions, that are required for actor power settings or sensor functions. Therefore, I did not pursue this path.

Anyhow, cbpi4 can be extended by plugins and it would be also possible to create an actor plugin based on gpiod. Would need to be done by someone who owns an orange or banana pi.

The easiest way to run cbpi4 on a different device or even in a docker is the usage of mqtt based actors and sensors. Then you could run cbpi from any system w/o the need of a pi at all.