espressif / arduino-esp32

Arduino core for the ESP32
GNU Lesser General Public License v2.1
13.3k stars 7.35k forks source link

Wrong pin number of SPI and I2C for LOLIN(Wemos) S2 MINI #10196

Open peaechan opened 3 weeks ago

peaechan commented 3 weeks ago

Board

LOLIN S2 MINI

Device Description

LOLIN(Wemos) S2 MINI with ESP32-S2FN4R2

Hardware Configuration

GPIO36 & 35 connected to SCK and MOSI

Version

latest master (checkout manually)

IDE Name

Arduino IDE 2.3.2

Operating System

Windows 11

Flash frequency

240MHz

PSRAM enabled

yes

Upload speed

921600

Description

I have a small project using ePaper with LOLIN(Wemos) S2 mini. Initially, GPIO36 & 35 connected to SCK and MOSI using attached pinout diagram but it won't work. Then, I found that default SPI pins in arduino IDE are not correct. So, I have modified the pin number of RXTX, SPI and I2C in pins_arduino.h.

Original:

static const uint8_t TX = 39;
static const uint8_t RX = 37;

static const uint8_t SDA = 33;
static const uint8_t SCL = 35;

static const uint8_t SS = 12;
static const uint8_t MOSI = 11;
static const uint8_t MISO = 9;
static const uint8_t SCK = 7;

Modified:

static const uint8_t TX = 39;
static const uint8_t RX = 40;

static const uint8_t SDA = 8;
static const uint8_t SCL = 9;

static const uint8_t SS = 34;
static const uint8_t MOSI = 35;
static const uint8_t MISO = 37;
static const uint8_t SCK = 36;

WEMOS-ESP32-S2-MINI

Sketch

None

Debug Message

None

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

lbernstone commented 3 weeks ago

Not sure where you got that image from. The Wemos reference does not include those markings, so I'm going to say the board mfr that wrote the variant file is correct here.

peaechan commented 3 weeks ago

FYI. The image is come from here.

Jason2866 commented 3 weeks ago

Clearly not branded as LOLIN(Wemos) S2 MIN. Yours is a StudioPieters board.