I am trying to use Adafruit's ESP8266 implementation for a project of mine, which makes use of a bunch of sensors. The problem I have is the limited amount of pins available from ESP8266:
- 2 pins are currently being used by I2C (SCL & SDA, pins 4 & 5)
- 4 pins used by the SD card (MOSI,MISO,CLK & CS, pins 12,13,14,16)
- 1 as a button input (pin 15)
- 2 for a UART sensor (Tx and Rx)
- 2 used for LEDs (pins 0 & 2, using the onboard LEDs)
This leaves me with no serial debugging and no future expansion capabilities, which is quite problematic, as I will probably need to add 1 more UART sensor.
One solution would be to use the analog input pin as the button input and free up one of the LED pins to create a 2nd software UART (not ideal, but it is a solution indeed).
My question is, is it somehow possible to multiplex the pin functionality without using an external IC (space is already quite limited)? So for example, use 2 pins as UART, when I am not writing to the SD card. Or would this just cause more problems?
Thanks in advance!