GPIO Map & Available Pins

This map covers the main I/O used by the GAP Ethernet (ESP32-WROOM + LAN8720) panel. All logic-level signals are 3.3 V. The LAN8720 Ethernet pins are reserved and must not be repurposed.

GPIO Signal / Device Direction Notes
GPIO2 DHT11 Temperature / Humidity INPUT (1-wire) Strap pin; idles high via DHT11, OK if wiring is clean
GPIO4 Garage Door Relay OUTPUT (momentary) Drives relay IN to simulate wall button
GPIO5 Buzzer (Active) OUTPUT Active buzzer, 3.3 V
GPIO13 Inside Garage Door Reed INPUT (pullup) Reed between GPIO13 and GND
GPIO14 Main Garage Door Reed INPUT (pullup) Primary door state (open/closed)
GPIO16 Outside Garage Door Reed INPUT (pullup) Reed between GPIO16 and GND
GPIO32 I²C SDA – OLED Bidirectional SDA for 0.96″ OLED (addr 0x3C)
GPIO33 I²C SCL – OLED OUTPUT SCL for 0.96″ OLED (addr 0x3C)
GPIO34 PIR Inside INPUT-only No internal pull-up; PIR module provides logic output
GPIO35 PIR Outside INPUT-only No internal pull-up; PIR module provides logic output

Wiring assumptions for this version: reeds on 13 (inside), 16 (outside), 14 (main); PIRs on 34 (inside) and 35 (outside); OLED on SDA=32, SCL=33; DHT11 on GPIO2; garage relay on GPIO4; buzzer on GPIO5.

Ethernet (LAN8720) – Reserved Pins

These GPIOs are dedicated to the LAN8720 RMII interface and must not be reused. They follow the WestTech – LAN8720 to ESP32 (Stable-Tested) mapping.

GPIO LAN8720 Signal Function
GPIO17 RMII CLK_OUT 50 MHz clock (internal clkout mode)
GPIO18 MDIO MDIO data line
GPIO23 MDC MDIO clock line
GPIO19 TX0 RMII transmit data 0
GPIO22 TX1 RMII transmit data 1
GPIO21 TX_EN RMII transmit enable
GPIO25 RX0 RMII receive data 0
GPIO26 RX1 RMII receive data 1
GPIO27 CRS RMII carrier sense

If Ethernet doesn’t come up, verify all LAN8720 power (3.3 V), grounds, and each RMII signal above. Then reboot the ESP32 and your switch.

Boot / Flash Pins & Extra Inputs

Boot/flash pins to avoid

  • GPIO6..11 – Flash pins (SDIO). Do not use.
  • GPIO0, GPIO2, GPIO12, GPIO15 – Boot strap pins; use with care.
  • GPIO1 (TX0), GPIO3 (RX0) – Serial console; avoid unless you know the trade-offs.

Input-only pins

These are input-only and have no internal pull-ups; they’re great for dry-contact sensors when paired with an external 10 kΩ pull-up to 3.3 V:

  • GPIO34, GPIO35, GPIO36 (VP), GPIO39 (VN)
  • Typical uses: safety beam, extra door/window reeds, additional PIRs, dry-contact inputs.

Usable with care (strap/LED caveats)

  • GPIO2 – Strap + sometimes onboard LED. Must not be pulled low at boot. Here used for DHT11 (idles high, OK if wiring is clean).
  • GPIO15 – Strap (usually pulled-down). Safer as OUTPUT; avoid external pull-up at boot.
  • GPIO0 – Strap; must be HIGH at boot (LOW enters flash mode). Generally avoid connecting external buttons directly.
  • GPIO12 – Strap; affects flash voltage. Avoid connecting anything that might pull it up at boot.
OLED – I²C Wiring

The 0.96″ OLED uses I²C at address 0x3C, powered from 3.3 V, and connected to GPIO32/33.

ESP32-WROOM OLED Module Typical Wire Color Function
3V3 VCC Red Display power (3.3 V)
GND GND Black Common ground
GPIO32 SDA Blue I²C data
GPIO33 SCL Green I²C clock
DHT11 – Temperature & Humidity

The DHT11 sensor is powered from 3.3 V and uses GPIO2 as its single data line.

ESP32-WROOM DHT11 Typical Wire Color Function
3V3 VCC Red Sensor power (3.3 V)
GND GND Black Common ground
GPIO2 DATA / OUT Yellow DHT11 data (1-wire)
Garage Door Reeds – Inside / Outside / Main

Three reed switches monitor the garage door: inside track, outside track, and main door state. Each is wired between the GPIO and ground with the internal pull-up enabled.

GPIO Reed Location Wiring Notes
GPIO13 Inside Garage Door Reed Reed between GPIO13 and GND INPUT, pullup enabled
GPIO16 Outside Garage Door Reed Reed between GPIO16 and GND INPUT, pullup enabled
GPIO14 Main Garage Door Reed Reed between GPIO14 and GND Primary open/closed state

With pull-ups enabled, the GPIO reads HIGH when the reed is open and LOW when the reed closes and connects the pin to ground.

PIR Motion Sensors – Inside & Outside

Two PIR sensors monitor inside and outside motion for auto-close logic and safety. GPIO34 and GPIO35 are input-only pins; the PIR modules provide the logic-level output.

GPIO PIR Wiring Notes
GPIO34 PIR Inside VCC to 5 V or 3.3 V (per module), GND to GND, OUT to GPIO34 Input-only; no internal pull-up
GPIO35 PIR Outside VCC to 5 V or 3.3 V (per module), GND to GND, OUT to GPIO35 Input-only; no internal pull-up
Garage Relay & Buzzer

Garage Door Relay (GPIO4)

The relay module simulates the garage wall-button press. The coil side is powered from 5 V (separate buck), while the IN pin is driven by GPIO4.

ESP32 / Rail Relay Module Function
5 V Supply DC+ Relay power (5 V)
GND (common) DC- Common ground with ESP32 and panel
GPIO4 IN Relay control (momentary pulse)
Garage opener button contacts NO / COM Connect in parallel with wall button

Buzzer (GPIO5)

The active buzzer is powered from 3.3 V and driven from GPIO5. It is used for pre-warn tones and continuous beep until close.

ESP32-WROOM Buzzer Function
3V3 VCC / + Power (3.3 V)
GND GND / − Common ground
GPIO5 IN (if 3-pin type) Drives buzzer (active type)