I2C Boolean Input and Output Support #399

Open
opened 2021-02-15 17:15:00 +00:00 by wickedbeernut · 0 comments
wickedbeernut commented 2021-02-15 17:15:00 +00:00 (Migrated from github.com)

Would you please consider supporting I2C boolean inputs (e.g., switch) and outputs (e.g., relay)? This would apply to outputs of type "Regular IO" and "Temperature / Humidity Control".

I2C is a clean, elegant solution. You only need to connect a single four-wire cable to the Raspberry Pi. You don't have dedicated wires running to each device. With Qwiic connectors, there is no soldering. The solution is truly plug-n-play. I2C switches and relays can be "daisy-chained" with the supported I2C temperature (and humidity) sensors (e.g., BME280). I've attached a picture of a Raspberry Pi connected to many sensors, switches, and relays.

An I2C button is often easier to support than a button hardwired to a general-purpose input (GPIO) in that the I2C button incorporates the "debounce" logic. Some I2C buttons are capable of generating an interrupt. Some I2C buttons are also capable of queuing (with a corresponding timestamp) button presses and clicks reducing the frequency with which the button must be read.

The logic associated with the I2C input_type (i.e., output_control and printer_control action_types) would be identical to the gpio input_type.

The logic associated with the I2C output_type would be identical to the regular output_type.

IMG_2635

Would you please consider supporting I2C boolean inputs (e.g., switch) and outputs (e.g., relay)? This would apply to outputs of type "Regular IO" and "Temperature / Humidity Control". I2C is a clean, elegant solution. You only need to connect a single four-wire cable to the Raspberry Pi. You don't have dedicated wires running to each device. With Qwiic connectors, there is no soldering. The solution is truly plug-n-play. I2C switches and relays can be "daisy-chained" with the supported I2C temperature (and humidity) sensors (e.g., BME280). I've attached a picture of a Raspberry Pi connected to many sensors, switches, and relays. An I2C button is often easier to support than a button hardwired to a general-purpose input (GPIO) in that the I2C button incorporates the "debounce" logic. Some I2C buttons are capable of generating an interrupt. Some I2C buttons are also capable of queuing (with a corresponding timestamp) button presses and clicks reducing the frequency with which the button must be read. The logic associated with the I2C input_type (i.e., output_control and printer_control action_types) would be identical to the gpio input_type. The logic associated with the I2C output_type would be identical to the regular output_type. ![IMG_2635](https://user-images.githubusercontent.com/47407361/107976005-27d49780-6f76-11eb-923f-a27076ac35c9.jpg)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Gandalf/OctoPrint-Enclosure#399