flyte / mqtt-io

Expose GPIO modules (Raspberry Pi, Beaglebone, PCF8754, PiFace2 etc.) and digital sensors (LM75 etc.) to an MQTT server for remote control and monitoring.
MIT License
461 stars 157 forks source link

Driving an output pin between low and (input pull up) #298

Open ryansch opened 1 year ago

ryansch commented 1 year ago

I have an 8 relay board from waveshare. It's an active-low board. It's working great with mqtt-io so far.

I'm using it to open and close heating valves in my house and I'd like to put in manual rocker switches to force the heating on even in the case of a complete software failure.

Is it feasible to switch the gpio pins to input mode with the internal pull up resistor attached as an alternative to driving an output high state? If this works, it would then allow the rocker switch to connect the circuit to ground to activate a relay.

If the physical electronics will let me do this, is it a feature that would be welcome in mqtt-io?

ryansch commented 1 year ago

It looks like this is called open collector or open drain.