whether there are adjustments to be made to the I2C address scanner to make it find with this chip?
whether I need or can control the address setting via the CSB and SD0 lines. ie. can I assume they are actually the AD0 and AD1 lines?
I ordered BMP280 temperature sensors and got similar looking boards labeled GY-B11-280 instead of BMP-280. The P is marked so it is not an E version with pressure - only temperature and humidity.
I ran the following code and it usually says no I2C devices found but occasionally says 0x47; about 10-20 passes between reports. I note that 0x47 is not one of the addresses the chip is supposed to offer. The data sheet says 48-50.
The address is set via AD0 and AD1 on the chip. I tried pulling each and both of CSB and SD0 high but no change. (then tried a different sensor board in case I fried something)
It's the same as for the actual BMP280 for the sensor.
But from a Vroom esp32 using pins D21-SDA and D22-SCL.
Scanner code
```
// https://www.circuitschools.com/interfacing-16x2-lcd-module-with-esp32-with-and-without-i2c/
#include <Wire.h> //include Wire.h library
void setup()
{
Wire.begin(); // Wire communication begin
Serial.begin(9600); // The baudrate of Serial monitor is set in 9600
while (!Serial); // Waiting for Serial Monitor
Serial.println("\nI2C address Scanner CircuitSchools.com");
}
void loop()
{
byte error, address; //variable for error and I2C address
int devicecount;
Serial.println("Scanning...");
devicecount = 0;
for (address = 1; address < 127; address++ )
{
// The i2c_scanner uses the return value of
// the Write.endTransmisstion to see if
// a device did acknowledge to the address.
Wire.beginTransmission(address);
error = Wire.endTransmission();
if (error == 0)
{
Serial.print("I2C device found at address 0x");
if (address < 16)
Serial.print("0");
Serial.print(address, HEX);
Serial.println(" !");
devicecount++;
}
else if (error == 4)
{
Serial.print("Unknown error at address 0x");
if (address < 16)
Serial.print("0");
Serial.println(address, HEX);
}
}
if (devicecount == 0)
Serial.println("No I2C devices found\n");
else
Serial.println("done\n");
delay(5000); // wait 5 seconds for the next I2C scan
}
```
That board is a BMP280 with a 5 to 3.3 Volt regulator and 5 <--> 3.3 volt level shifters. I'm not sure it works with a 3.3volt board.
This is the I2C scanner I have used and know it works. You might give it a try:
#include <Wire.h>
void setup() {
Wire.begin();
Serial.begin(9600);
while (!Serial); // Leonardo: wait for serial monitor
Serial.println("\nI2C Scanner");
}
void loop() {
byte error, address;
int nDevices;
Serial.println("Scanning...");
nDevices = 0;
for (address = 1; address < 127; address++ )
{
// The i2c_scanner uses the return value of
// the Write.endTransmisstion to see if
// a device did acknowledge to the address.
Wire.beginTransmission(address);
error = Wire.endTransmission();
if (error == 0)
{
Serial.print("I2C device found at address 0x");
if (address < 16)
Serial.print("0");
Serial.print(address, HEX);
Serial.println(" !");
nDevices++;
}
else if (error == 4)
{
Serial.print("Unknown error at address 0x");
if (address < 16)
Serial.print("0");
Serial.println(address, HEX);
}
}
if (nDevices == 0)
Serial.println("No I2C devices found\n");
else
Serial.println("done\n");
delay(5000); // wait 5 seconds for next scan
}
Looking at other BMP280 boards, I came to realize that this clone board has a bad print job.
Instead of GY B11 P 280 it should read GY BM P 280. I guess the GY influenced my vision.
It still is a clone board I think as it uses a Texas Instrument instead of a Bosch sensor and that probably explains the bad print job.
@JohnRob. Thanks, I'll try your scanner and if no luck on the three boards tested then I'll shift to the SPI interface and see if that works.