WEMOS LOLIN32 mini: Can't find I2C bus - Page 1
Forum section: electronics / general

author: frowin
author_rank: Newbie
timestamp: May 29, 2020, 08:56:11 am
content: Hi guys,I have an esp32 lite (often known as WEMOS LOLIN32) from a chinese vendor you all likely know. So far, it works perfectly. Now I can't get I2C to run. Some sources say, SCL is on 19 and SDA on 23 and some other sources 14 and 12, respectively.Unfortunately, I can't get any of these two configurations to run. Vendor page doesn't provide any pinouts. Do you have any tips how to find these pins? When I search for this, I only get the address finders. The I2C module I want to use does work on other Arduinos. Maybe you have a hint or tip?Thank you very much in advance for your help!Stay healthy. Greetings from Germany!Yours,Frowin

author: mikerj
author_rank: Super Contributor
timestamp: May 29, 2020, 09:29:20 am
content: https://randomnerdtutorials.com/esp32-built-in-oled-ssd1306/This says the default pins for the ADFruit library are GPIO 22 and GPIO 21, but any pins can be configured. You will almost certainly need external pull-ups unless operating the bus at very low speeds. The ESP32 has internal pull-ups but they are very weak.

author: frowin
author_rank: Newbie
timestamp: May 29, 2020, 07:09:00 pm
content: Thanks for your reply!I'm not using this specific WEMOS with display. I use one without display and I want to access the MPU6050 (GY-521 breakout board). In the library it just says something about 2Wire or so. So know specific pin definition. So that's why I want to find out what pins the wire.h uses in case of my ESP32 lite

author: oPossum
author_rank: Super Contributor
timestamp: May 29, 2020, 07:17:50 pm
content: Default is 22 & 21. It can be changed in Wire.begin()

author: frowin
author_rank: Newbie
timestamp: May 29, 2020, 07:21:26 pm
content: This Wemos has unfortunately no pin 21. The Adafruit sketch for MPU6050 does not have a Wire.begin() and this would be software bit bang, right? Can't believe that I'm struggling with this trivia as finding i2c pins

author: hamster_nz
author_rank: Super Contributor
timestamp: June 10, 2020, 08:01:47 am
content: This tutorial has a section on using different pins doe I2C. Maybe that will be of help?https://randomnerdtutorials.com/esp32-i2c-communication-arduino-ide/

author: mikerj
author_rank: Super Contributor
timestamp: June 10, 2020, 08:12:51 am
content: Looks like the Lolin32 "Lite" has a different pinout.This threadsuggests the default I2C pins are 23 (SDA) and 19 (SCK) on the Lite version.

author: rpatarh
author_rank: Newbie
timestamp: November 10, 2022, 03:39:47 pm
content: not .... SCL is on 19 and SDA on 23SDA is on 19 and SCL on 23

author: rpatarh
author_rank: Newbie
timestamp: November 10, 2022, 03:42:48 pm
content: void setup() {Serial.begin(115200);Serial.print("MOSI: ");Serial.println(MOSI);Serial.print("MISO: ");Serial.println(MISO);Serial.print("SCK: ");Serial.println(SCK);Serial.print("SS: ");Serial.println(SS);Serial.print("SDA: ");Serial.println(SDA);Serial.print("SCL: ");Serial.println(SCL);}void loop() {// put your main code here, to run repeatedly:}

author: rpatarh
author_rank: Newbie
timestamp: November 10, 2022, 03:47:31 pm
content: and thento Serial Monitor22:45:55.423 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)22:45:55.423 -> configsip: 0, SPIWP:0xee22:45:55.423 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x0022:45:55.423 -> mode:DIO, clock div:122:45:55.423 -> load:0x3fff0018,len:422:45:55.423 -> load:0x3fff001c,len:104422:45:55.423 -> load:0x40078000,len:1012422:45:55.423 -> load:0x40080400,len:585622:45:55.423 -> entry 0x400806a822:45:55.534 -> MOSI: 2322:45:55.534 -> MISO: 1922:45:55.534 -> SCK: 1822:45:55.534 -> SS: 522:45:55.570 -> SDA: 19. <-----22:45:55.570 -> SCL: 23. <-----the above program, can be used to find out on other modules.hi... I'm from Indonesia