sensorReporter icon indicating copy to clipboard operation
sensorReporter copied to clipboard

implement lgpio-lib for RpiGpioActuator & GpioColorLED

Open DanielDecker opened this issue 10 months ago • 0 comments

This PR changes the GPIO library for the RpiGpioActuator & GpioColorLED to lgpio.

*changed RpiGpioActuator & GpioColorLED to use lgpio instead of RPi.GPIO +added type annotation for RpiGpioActuator, GpioColorLED, core.sensor and core.actuator to allow type checking (e. g. with mypy) *GpioColorLED modified so it can be used as a single-channel dimmer

Difference to the RPi.GPIO implementation: after exiting sensor_reporter the GPIOs return to the state before sensor_reporter claimed them. In a later PR I'll remove the ColorHSV class from the i2c.pwm file and use the one in utils.

Tested with Debian 12 (bookworm, kernel 6.6) with mqtt, home and openHab connector. This PR is ready to merge.

DanielDecker avatar Apr 14 '24 11:04 DanielDecker