hey guys,
I use Arduino and ESP32-S3-N16R8, i can't find my i2c(V53L1X & 1.3ich oled) through i2c scanner, even i use Wire.begin() to reset my pins.HOW to troubleshoot? it's emergency
Which Arduino you are using -- UNOR3, classic NANO, DUE, MEGA?
no,i use ESP32s3, but use arduino IDE
That means that you have connected two ESP32S3 boards together.
Please, post Master/Slave sketches.
#include "Wire.h"
void setup() {
Serial.begin(115200);
Wire.begin();
Wire.setPins(6,7);
}
void loop() {
byte error, address;
int nDevices = 0;
delay(5000);
Serial.println("Scanning for I2C devices ...");
for (address = 0x01; address < 0x7f; address++) {
Wire.beginTransmission(address);
error = Wire.endTransmission();
if (error == 0) {
Serial.printf("I2C device found at address 0x%02X\n", address);
nDevices++;
} else if (error != 2) {
Serial.printf("Error %d at address 0x%02X\n", error, address);
}
}
if (nDevices == 0) {
Serial.println("No I2C devices found");
}
}
Connect 5V/3.3V and GND wires with your OLED. These two connections are not seen in your picture of post #5.
Uplaod the following sketch to find the presence of your OLED on the I2C Bus.
#include<Wire.h>
byte busStatus;
void setup()
{
Serial.begin(9600);
Wire.begin();
for (int i2cAddress = 0x00; i2cAddress < 0x80; i2cAddress++)
{
Wire.beginTransmission(i2cAddress);
busStatus = Wire.endTransmission();
if (busStatus == 0x00)
{
Serial.print("I2C Device found at address: 0x");
Serial.println(i2cAddress, HEX);
}
else
{
Serial.print("I2C Device not found at address: 0x");
Serial.println(i2cAddress, HEX);
}
}
}
void loop()
{
}
yes,i have connected 3.3V and GND.but it still have no i2c device
show like following
16:36:38.681 -> ESP-ROM:esp32s3-20210327
16:36:38.681 -> I2C Device not found at address: 0x0
16:36:38.681 -> I2C Device not found at address: 0x1
16:36:38.681 -> I2C Device not found at address: 0x2
16:36:38.681 -> I2C Device not found at address: 0x3
16:36:38.681 -> I2C Device not found at address: 0x4
16:36:38.681 -> I2C Device not found at address: 0x5
16:36:38.681 -> I2C Device not found at address: 0x6
16:36:38.681 -> I2C Device not found at address: 0x7
16:36:38.681 -> I2C Device not found at address: 0x8
16:36:38.681 -> I2C Device not found at address: 0x9
16:36:38.681 -> I2C Device not found at address: 0xA
16:36:38.681 -> I2C Device not found at address: 0xB
16:36:38.681 -> I2C Device not found at address: 0xC
16:36:38.681 -> I2C Device not found at address: 0xD
16:36:38.681 -> I2C Device not found at address: 0xE
16:36:38.681 -> I2C Device not found at address: 0xF
16:36:38.681 -> I2C Device not found at address: 0x10
16:36:38.681 -> I2C Device not found at address: 0x11
16:36:38.681 -> I2C Device not found at address: 0x12
16:36:38.681 -> I2C Device not found at address: 0x13
16:36:38.681 -> I2C Device not found at address: 0x14
16:36:38.681 -> I2C Device not found at address: 0x15
16:36:38.681 -> I2C Device not found at address: 0x16
16:36:38.681 -> I2C Device not found at address: 0x17
16:36:38.681 -> I2C Device not found at address: 0x18
16:36:38.681 -> I2C Device not found at address: 0x19
16:36:38.681 -> I2C Device not found at address: 0x1A
16:36:38.681 -> I2C Device not found at address: 0x1B
16:36:38.681 -> I2C Device not found at address: 0x1C
16:36:38.681 -> I2C Device not found at address: 0x1D
16:36:38.681 -> I2C Device not found at address: 0x1E
16:36:38.681 -> I2C Device not found at address: 0x1F
16:36:38.681 -> I2C Device not found at address: 0x20
16:36:38.681 -> I2C Device not found at address: 0x21
16:36:38.681 -> I2C Device not found at address: 0x22
16:36:38.681 -> I2C Device not found at address: 0x23
16:36:38.681 -> I2C Device not found at address: 0x24
16:36:38.681 -> I2C Device not found at address: 0x25
16:36:38.681 -> I2C Device not found at address: 0x26
16:36:38.681 -> I2C Device not found at address: 0x27
16:36:38.681 -> I2C Device not found at address: 0x28
16:36:38.681 -> I2C Device not found at address: 0x29
16:36:38.681 -> I2C Device not found at address: 0x2A
16:36:38.681 -> I2C Device not found at address: 0x2B
16:36:38.681 -> I2C Device not found at address: 0x2C
16:36:38.681 -> I2C Device not found at address: 0x2D
16:36:38.681 -> I2C Device not found at address: 0x2E
16:36:38.681 -> I2C Device not found at address: 0x2F
16:36:38.681 -> I2C Device not found at address: 0x30
16:36:38.681 -> I2C Device not found at address: 0x31
16:36:38.681 -> I2C Device not found at address: 0x32
16:36:38.681 -> I2C Device not found at address: 0x33
16:36:38.681 -> I2C Device not found at address: 0x34
16:36:38.681 -> I2C Device not found at address: 0x35
16:36:38.681 -> I2C Device not found at address: 0x36
16:36:38.681 -> I2C Device not found at address: 0x37
16:36:38.681 -> I2C Device not found at address: 0x38
16:36:38.681 -> I2C Device not found at address: 0x39
16:36:38.681 -> I2C Device not found at address: 0x3A
16:36:38.681 -> I2C Device not found at address: 0x3B
16:36:38.681 -> I2C Device not found at address: 0x3C
16:36:38.681 -> I2C Device not found at address: 0x3D
16:36:38.681 -> I2C Device not found at address: 0x3E
16:36:38.681 -> I2C Device not found at address: 0x3F
16:36:38.681 -> I2C Device not found at address: 0x40
16:36:38.681 -> I2C Device not found at address: 0x41
16:36:38.681 -> I2C Device not found at address: 0x42
16:36:38.681 -> I2C Device not found at address: 0x43
16:36:38.681 -> I2C Device not found at address: 0x44
16:36:38.681 -> I2C Device not found at address: 0x45
16:36:38.681 -> I2C Device not found at address: 0x46
16:36:38.681 -> I2C Device not found at address: 0x47
16:36:38.681 -> I2C Device not found at address: 0x48
16:36:38.681 -> I2C Device not found at address: 0x49
16:36:38.681 -> I2C Device not found at address: 0x4A
16:36:38.681 -> I2C Device not found at address: 0x4B
16:36:38.681 -> I2C Device not found at address: 0x4C
16:36:38.681 -> I2C Device not found at address: 0x4D
16:36:38.681 -> I2C Device not found at address: 0x4E
16:36:38.681 -> I2C Device not found at address: 0x4F
16:36:38.681 -> I2C Device not found at address: 0x50
16:36:38.681 -> I2C Device not found at address: 0x51
16:36:38.681 -> I2C Device not found at address: 0x52
16:36:38.681 -> I2C Device not found at address: 0x53
16:36:38.681 -> I2C Device not found at address: 0x54
16:36:38.681 -> I2C Device not found at address: 0x55
16:36:38.681 -> I2C Device not found at address: 0x56
16:36:38.681 -> I2C Device not found at address: 0x57
16:36:38.681 -> I2C Device not found at address: 0x58
16:36:38.681 -> I2C Device not found at address: 0x59
16:36:38.681 -> I2C Device not found at address: 0x5A
16:36:38.681 -> I2C Device not found at address: 0x5B
16:36:38.681 -> I2C Device not found at address: 0x5C
16:36:38.681 -> I2C Device not found at address: 0x5D
16:36:38.681 -> I2C Device not found at address: 0x5E
16:36:38.681 -> I2C Device not found at address: 0x5F
16:36:38.681 -> I2C Device not found at address: 0x60
16:36:38.681 -> I2C Device not found at address: 0x61
16:36:38.681 -> I2C Device not found at address: 0x62
16:36:38.681 -> I2C Device not found at address: 0x63
16:36:38.681 -> I2C Device not found at address: 0x64
16:36:38.681 -> I2C Device not found at address: 0x65
16:36:38.681 -> I2C Device not found at address: 0x66
16:36:38.681 -> I2C Device not found at address: 0x67
16:36:38.681 -> I2C Device not found at address: 0x68
16:36:38.681 -> I2C Device not found at address: 0x69
16:36:38.681 -> I2C Device not found at address: 0x6A
16:36:38.681 -> I2C Device not found at address: 0x6B
16:36:38.681 -> I2C Device not found at address: 0x6C
16:36:38.728 -> I2C Device not found at address: 0x6D
16:36:38.728 -> I2C Device not found at address: 0x6E
16:36:38.728 -> I2C Device not found at address: 0x6F
16:36:38.728 -> I2C Device not found at address: 0x70
16:36:38.728 -> I2C Device not found at address: 0x71
16:36:38.728 -> I2C Device not found at address: 0x72
16:36:38.728 -> I2C Device not found at address: 0x73
16:36:38.728 -> I2C Device not found at address: 0x74
16:36:38.728 -> I2C Device not found at address: 0x75
16:36:38.728 -> I2C Device not found at address: 0x76
16:36:38.728 -> I2C Device not found at address: 0x77
16:36:38.728 -> I2C Device not found at address: 0x78
16:36:38.728 -> I2C Device not found at address: 0x79
16:36:38.728 -> I2C Device not found at address: 0x7A
16:36:38.728 -> I2C Device not found at address: 0x7B
16:36:38.728 -> I2C Device not found at address: 0x7C
16:36:38.728 -> I2C Device not found at address: 0x7D
16:36:38.728 -> I2C Device not found at address: 0x7E
16:36:38.728 -> I2C Device not found at address: 0x7F
Do you have an Arduino UNO? If yes, connect your OLED with UNO and upload the same scanning sketch in order to verify that the OLED is not damaged.
no,i don't have UNO
i think maybe problem is ESP32's i2c pins incorrectly set.but i have no idea to solve it.
Do you have any other I2C sensor/device like BME280/LCD so that it can be verified that you have correctly connected the I2C lines with the slave device.
Please, tell me which GPIO pins of ypue ESP32S3 are connected with SDA and SCL lines of your OLED?
How many are there in your OLED and what are their names?
yes,i'm tring to use another oled ,but before this i have connected a VL53L1X sensor also show no i2c device.
i use GPIO 6 as SDA, GPIO 7 as SDL
my OLED have four pins ,GND VCC SDL SDA ,and i have correctly connect them
I am suspecting this.
Please, post a pictue of your ESP32S3 Dev Board.
Are you using the following oard?
How do you know that GPIO-6/7 are SDA/SCL lines of I2C Bus?
thank you very much!!!!!!! i have found my i2c device ,thanks for your help!!!!
Then try by uploading the following scanning sketch which contains the SDA/SCL's GPIO numbers explicitly.
#include<Wire.h>
byte busStatus;
void setup()
{
Serial.begin(9600);
Wire.begin(6, 7); //SDA = GPIO-6, SCL = GPIO-7
for (int i2cAddress = 0x00; i2cAddress < 0x80; i2cAddress++)
{
Wire.beginTransmission(i2cAddress);
busStatus = Wire.endTransmission();
if (busStatus == 0x00)
{
Serial.print("I2C Device found at address: 0x");
Serial.println(i2cAddress, HEX);
}
else
{
Serial.print("I2C Device not found at address: 0x");
Serial.println(i2cAddress, HEX);
}
}
}
void loop()
{
}