I have 4 transistors I'd like to switch on and off to send power to one of 4 different speakers.
If I were using arduino, I'd simply control each of those transistors with 4 pins, however, I'm using a different open source datalogger, and I am out of pins to power the transistors. I do have an I2C bus, and I'm curious if there is an IC that can be controlled by I2C that will let me replicate what the arduino does (turning pins high/low to run the transistor).
I am NOT looking for the TCA i2c multiplexer, as this lets me run multiple different i2c buses. I'm just trying to work aroudn the fact I don't have enough pins to run all 4 transistors. I only have one spare analog pin, or the I2C bus.
Since it is comparatively slow and tedious to toggle outputs on a port expander and driving speakers will presumably require frequent switching to generate audio tones, I would suggest using a port expander to perform some of the other functions you are using to free up Arduino pins for the speakers.