-
Notifications
You must be signed in to change notification settings - Fork 7
Pin usage on various dev boards
Which pins to use on which dev boards is an inexact science. A lot of the documentation easily available seems to be wrong, maybe auto-generated or something.
The recommendations below match our experience, we welcome additions and corrections.
Note that the pin number on the board and for pin selects differ in most board and is shown e.g D6/12 to mean D6 is a constant that points to pin 12 on the board.
The pins on all the D1 range are supposedly the same. I have not found significant differences.
See .platformio/packages/framework-arduinoespressif8266/variants/d1_mini/pins_arduino.h
- The only analog pin is A0/3
- On at least one board this is bridged to the battery voltage (the Green D1 mini pro V2) via solder pads.
- Safe appear to be D0/16 D5/14 D6/12 D7/13 D4/2 D8/15 boot fails if this pulled high I2C is SCL=D1/5 SDA=D2/4
Lolin pages for D1 Mini D1 Mini Pro (V2 Green)
.platformio/packages/framework-arduinoespressif32/variants/lolin_c3_mini/pins_arduino.h
- Analog or Digital I/O on A0..A5/0..5
- Digital only 7..10
- Note A3 is solder bridged to battery voltage check
- I2C: SCL=10 SDA=8
- SPI is SCK=2 MISO=3 MOSI=4 SS=5 so clashes with the GPIO Analog/Digital
- LED = 7 and is multicolor
Lolin official C3 mini page Mischianti's mapping
This is my current favorite board, affordable and with lots of pins.
- Best for analog or digital are on 6,8,10,13,14,15
- also 7,9,11,12 but they are also used for SPI and I've seen issues on pin 11;
- also Digital but not analog on 28,37..44
- ADC2 is shared with WiFi pins 16..19,21..24, so better not to use it
- I2C: SDA=33 SCL=35 (Other docs saying 13 & 14 are probably wrong)
- avoid TX=39 RX=37
- avoid SPI 7,9,11,12 (other docs say 38..41 which are probably wrong)
This is a very small, cheap and simple board,
- See the board definition used in the
agriandlcd_shtexamples. - It only exposes 0..10, 20 and 21
- 2 and 9 are involved with boot - 9 can be used as an output, but avoid as input
- 8 is connected to the onboard LED, only really use if want to external the LED.
- Typically I2C SDA=4 SCL=5 but these need to be defined as defaults are 8 and 9, interfering with LED
- Only 0..4 can be used for analog, so if need an extra Analog, move I2C to 5/6
Note Pinouts online for this are in some cases wrong ...
Artronshops pinout looks correct except need to move SDA away from pin 8.