How to use all GPIO pins in d1mini pro?

Hello,

I have d1mini board soldered using all pins. I would like to use any remaining - looking on
I would like to use GPIO16 GPIO1 GPIO0 which has some strange labels on image, and doesn’t work when I have tried to use it.

This is bathroom fan / light controller with temperature measurement on i2c and 2 hardware buttons.

So, I am using pins:

GPIO12
GPIO13
GPIO14
GPIO15

GPIO2
GPIO3
GPIO4
GPIO5

When I have tried to use GPIO0 connected sensor/relays blocks start of the board. To restart the board I have had unplug that pin and manually restart board.
Currently I am not sure about behaviour on using GPIO1 (TX) pin, but connecting switch - binary_sensor here also doesn’t work (or been blocking start).

How can I use GPIO1, GPIO0 and GPIO16 pins?

Below my code

i2c:
  - sda: GPIO4
    scl: GPIO5
    id: bus_a


sensor:

  - platform: htu21d
    temperature:
        name: "temp"
    humidity:
        name: "hum"
    update_interval: 1s

web_server:
  port: 80
  
switch:
  - platform: gpio
    pin: GPIO15   #D8
    name: "IN1gpio15" 
    id: IN1
  - platform: gpio 
    pin: GPIO13  #D7
    name: "IN2gpio13"
    id: IN2
  - platform: gpio 
    pin: GPIO12  #D6
    name: "IN3gpio12" 
    id: IN3
  - platform: gpio 
    pin: GPIO14  #D5
    name: "IN4gpio14" 
    id: IN4


binary_sensor:
  - platform: gpio
    pin: GPIO3 #GPIO2
    name: "light"
    device_class: window
    id: b1
    on_state:
      then:
        - switch.toggle: IN2
  - platform: gpio
    pin: GPIO2 #GPIO0
    name: "fan"
    device_class: window
    id: b2
    on_press:
      then:
        - switch.toggle: IN3

Thanks in advance for any help :slight_smile:
regards

I might be totally wrong about this, but you should disable serial logging if you want to use serial pins on esp8266. This might help with those GPIO 0 & 1. See baud_rate attribute https://esphome.io/components/logger.html?highlight=baud_rate

I have given up on the pins… I use MCP23017 and that makes me 16 pins on 1 pin :crazy_face:. I use d1 of the D1 :rofl:.

This page https://randomnerdtutorials.com/esp8266-pinout-reference-gpios/ is pretty good on which GPIOs to use. There is a table down the page which lists which ones are good to use.

ESP32s are not expensive these days and have more IO. Or follow @sender’s suggestion :slight_smile: