Hi I have a version of the esp8266 with 1 analog pin, TX and RX pins. I'm looking to attach a temperature sensor (Grove - I2C High Accuracy Temperature Sensor - MCP9808), humidity, and a few others in addition to controlling a logic-level MOSFET for LED control.
What would I use for this? Would a multiplexer like the CD74HC4067 or the MCP23017 - i2c 16 Input/Output Port Expander work?
Basically, I need to both expand serial/digital input and still have at least 1 output control.
Well, (analog) multiplexers are not appropriate to control outputs as when you switch to a different device, the one from which you switched away is now connected to nothing, so is no longer under control at all.
Stick to i2c devices if you can. The mcp23017 will control your MOSFET for example, but if you don't need 16 digital pins, there is mcp23008 or pcf8574. For humidity, sht21 or similar. If you need more analog inputs, consider ads1115.
I only need 3-5 sensor inputs. Will the mcp23008 or pcf8574 be able to do analog/digital input and control the MOSFET? Also, what's the difference between the 2, I can't really find much of comparison online? Thanks