from what i understand as long as i specify an address for Wire(addr) the device will be a slave. the master would be undefined. i suppose software serial may be an option. more importantly here is stability. i dont want a device to freeze if the i2c gets some noise
i could use a port expander. i just dont have one. i do have arduinos. I think the arduino could be more useful. i could probably flash the arduino over spi if i needed to. but i could just simple make it change output state like expander too
I think it can happen. All you have to do is set a free address in the software and work as a slave device. The datasheet shows that the ATmega328 can work below 3 volts if it is 8 MHz. In this way, it will be possible to connect directly to the ESP and possibly be powered by it.
I might if the arduino dont work well. i have so many nanos and 0 i/o expanders. i dont see why it should be an issue. except for making sure the slave arduino received the message from the master and the master can request the pin states right after to make sure my request to change pin state was successful
Need to program ATmega328 as standalone without external XTAL - 8MHz is possible with internal RC generator. Need test of what speed is possible on I2C in that case because internal oscilator is not very precisly. I2C work on 100kHz, 400kHz, 1MHz or 3.4MHz. Work on internal oscilator is possible with program of fuse bits. In ESP8266 is no needed to change nothing. I use similar (ATmega88) work on internal RC oscilator for different purpose.