pimoroni / fanshim-python

Python library for the Fan SHIM for Raspberry Pi
https://shop.pimoroni.com/products/fan-shim
MIT License
295 stars 86 forks source link

LED control doesn't appear to work #94

Closed jimklo closed 2 years ago

jimklo commented 3 years ago

Trying to create my own variant of the service that controls the led in a different manner.

Finding that the library doesn't seem to alter how the LED functions.

import fanshim import FanShim

fs = FanShim()
fs.set_light(0, 0, 0, brightness=0)  # assuming this should turn it off, however led stays lit.
fs.set_light(255, 0, 0, brightness=0.5) # assuming this should turn the led red, at about 50%  brightness, however led stays lit white.

Note that I've looked at #5 and noted that uart_enabled=1 does exist in my /boot/config.txt, which is required to use the MMDVM_HS_DUAL HAT I'm using. I've tried reseating the shim, but it seems like that is not the issue.

FWIW fan control and button control does work, so far the LED seems to be the only issue.

jimklo commented 3 years ago

Okay, I think I may know what's going on. Looking at the shim pinout and comparing with the MMDVM_HS_DUAL pinout, I'm seeing that there is a conflict with GPIO 14/15. Not sure if there is a way to modify the shim to make this work short of having another shim board and wiring to a pair of unused GPIO pins.

Gadgetoid commented 2 years ago

Some trace cutting and careful bodge wire soldering might work, but otherwise you'd have to spin the fan shim around, wire up to the header manually and find some way to secure it to the board.

I think in the time since we originally created Fan SHIM the Pi 4's thermal management has been "fixed" anyway, so it's probably redundant.