We’ve had a couple of projects where pins are really tight. I’ve looked at multiplexing and using the LED pins and using an i2c screen but they are all less than perfect.
I recently found that there are a couple of micro controllers that allow you to add a bank of pins over i2c. I’ve bought a PCF8574 but there’s also the MCP23017. It seems like if you’re using Python, reading/writing binary states over i2c is really simple, but my daughter isn’t there yet.
Does anyone know of a block-friendly way to do this sort of thing?
Here is an example. My Maqueen Plus V2 robot has the headlights on the i2c bus. I can use the blocks, but here is how I would use the i2c interface directly to get to the LED headlights.