I'd like to add a push button next to an OLED display to essentially switch modes on the graphics of the display.
My main issue is that from the Arduino to the OLED display and housing there is only a 4-wire connection for I2C.
I would like to add a button to this display housing and somehow communicate a state change over I2C using the momentary push button. Is this possible somehow?
Do special I2C buttons exists? I tried searching and nothing good came up.
"hello device with number X please answer."
here is device X
"hello device with number Y please answer."
here is device Y
"hello device with number Z please answer."
here is device Z
if the bitbanging signals on the bus don't match the device-number
the device will not react.
This means it should be possible to simply add an I2C-IO-port-expander to the same
SDA/SCL-wires as the OLED-display and then be able to communicate with both devices
if the OLED and the IO-expander have different device-adresses.
Most IO-expanders are adjustable to different device-adresses.
If all the code is written by you or you understand what the OLED-code is doing
you will be able to add the code for the buttons.