The PCF8574 expander, fits perfectly with the ESP and is relatively cheap. I write relatively cheap, because using an AVR e.g. AM8 as a port expander the Atmega may turn out to be cheaper. Simple examples of how to address the above chip in LUA.
All ports zeroed, i.e. high state:
Port1 ON
Scanner:
Port readout and address scanner I will insert the PCF in a free chili.
All ports zeroed, i.e. high state:
Code: Lua
Port1 ON
Code: Lua
Scanner:
Code: Lua
Port readout and