|
| 1 | +--- |
| 2 | +title: GPIO pinout - BTN-1 |
| 3 | +description: Pin-by-pin maps of the BTN-1's side and top GPIO headers, with the GPIO number and function of every pin. |
| 4 | +--- |
| 5 | +# BTN-1 GPIO pinout |
| 6 | + |
| 7 | +The BTN-1 has two GPIO headers on its circuit board: a 10-pin header on the side and a 16-pin header on the top. Use these maps to wire extra sensors, LEDs, or other hardware to your BTN-1 and to find the GPIO numbers you need in ESPHome. |
| 8 | + |
| 9 | +!!! note "Open the case to reach the headers" |
| 10 | + |
| 11 | + The headers are on the circuit board inside the case. Follow [Teardown and reassembly of BTN-1](../troubleshooting/btn1-teardown.md) to lift out the board, and flip the battery switch off first if your BTN-1 has a battery. |
| 12 | + |
| 13 | +## Side header |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | +The table below is laid out like the header in the photo, with pin 1 at the end farthest from the USB-C port. |
| 18 | + |
| 19 | +| Row | | | | | | |
| 20 | +| --- | --- | --- | --- | --- | --- | |
| 21 | +| Nearest the board | **1** GPIO23 | **2** Ground | **3** LED_Next (GPIO21) | **4** +VOUTPUT | **5** +3v3_CTRL | |
| 22 | +| Outer | **6** GPIO4 | **7** GPIO22 | **8** GPIO19 | **9** SCL | **10** SDA | |
| 23 | + |
| 24 | +- **LED_Next** is tied to the BTN-1's existing LEDs. |
| 25 | +- **+VOUTPUT** is 5V from USB, or + from the battery. |
| 26 | + |
| 27 | +## Top header |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | +The top header is two blocks of eight pins, laid out below like the header in the image. |
| 32 | + |
| 33 | +### Block nearest the USB-C port |
| 34 | + |
| 35 | +| Row | | | | | |
| 36 | +| --- | --- | --- | --- | --- | |
| 37 | +| Nearest the board | **1** +VBAT | **2** Reset button | **3** Boot button (GPIO2) | **4** SCL (GPIO0) | |
| 38 | +| Outer | **5** USB D- | **6** USB D+ | **7** SDA (GPIO1) | **8** GPIO3 | |
| 39 | + |
| 40 | +### Block nearest the buttons |
| 41 | + |
| 42 | +| Row | | | | | |
| 43 | +| --- | --- | --- | --- | --- | |
| 44 | +| Nearest the board | **9** GPIO7 | **10** GPIO14 | **11** GPIO15 | **12** GPIO20 | |
| 45 | +| Outer | **13** +5V | **14** +3v3_CTRL | **15** GPIO22 | **16** Ground | |
| 46 | + |
| 47 | +!!! tip "+3v3_CTRL is switched" |
| 48 | + |
| 49 | + The +3v3_CTRL pin on both headers only has power while GPIO18 is on. If something you power from it stays off, check that GPIO18 is on. |
0 commit comments