Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By ralph5
#89975 I'm trying to get any reasonable answer from the device.
The wiring is:
VCC to 3.3 V
GND to GND
SCL to D1 and 1K Pullup to VCC
SDA to D2 and 1K Pullup to VCC

I also have tried to switch the wiring between D1 and D2, but no better result.

At the moment all I want is, to receive an answer at the correct address which should be 41 or 0x29.
But I get no result.
I tried it with two different items.

One I bought here: https://www.ebay.de/itm/173662310935 the other one at:
https://eckstein-shop.de/GY-53L1-Laser- ... gK_DfD_BwE

They look different and behave different. With the first one I don't get a reaction to any address, while with the second one I get random addresses as result.

The actual code is:
#include <Wire.h>

void setup()
{
Serial.begin(115200);
Serial.println();
Serial.println("Start");

Serial.println("****** I2C-Scanner *****");
Serial.println("\nStart Scan (400 kHz) ... ");
Wire.begin();
Wire.setClock(400000L);
}

void loop()
{
//Serial.println();
for (byte I2CAdd = 1; I2CAdd < 128; I2CAdd++)
{
Wire.beginTransmission(I2CAdd);
byte fehler = Wire.endTransmission();
if (fehler == 0)
{
Serial.print("Chip with address ");
Serial.print(I2CAdd);
Serial.println(" found!");
}
}
}

I would be glad for any propositions. :lol:
User avatar
By QuickFix
#90021 You're now trying to get the "Normal Arduino" version running on an ESP, while you should actually modify it a little (ESP8266 <> ATMEL controller hardware). :idea:

Luckily someone already did the hard work for you and even made a small how-to (with some nice info about I2C in general) on Instructbles.com. 8-)