MultiSpeed I2C Scanner - 50,100,200,400 KHz.

Hi,
I have added the Multi Speed I2C to my webserver, running on a Arduino Mega 2560.

But when I let it try 500kHz my webserver crashes.
Is it possible to detect a I2C error without causing a crash ?

In Arduino 1.5.8 the new Wire.setClock() can be used.

table-multispeedtest.png

Peter_n: Is it possible to detect a I2C error without causing a crash ?

Really depends on the cause of the crash. Does the I2C scanner work when used standalone (no webserver)? Does the webserver crash if you just set the I2C clock to 500KHz?

You may post your code ....

I found the problem, but I don’t know how to solve it.
Setting the TWBR down to 2 (for 800kHz) is normally no problem.

Only in the situation when I have a Arduino as Slave at 5V and another Arduino as Slave at 3.3V (using a level shifter). In that situation the sketch never returnes from Wire.endTransmission() when the speed is too high. At the moment it happens at 670kHz, when TWBR becomes 3.

Below is my function to make a webpage.
On the ‘home’ page I have a link to “SCAN”. When I click it, the file “SCAN” is requested. But instead loading it from the SD card, I recognize the keyword and call the function “MultiSpeedI2CScanner”.
Everything (table, colspan) is only up to 400kHz. To allow the higher speeds, the html code for the table should be adjusted.

// MultiSpeedI2CScanner
// To be used in a webserver, it outputs HTML code with the result
// The new Wire.setClock() is available in Arduino IDE 1.5.8, but that is not used yet.
// It is assumed that Wire.begin() has been called already.
//
// Using:
//
//  FILE: MultiSpeedI2CScanner.ino
//  AUTHOR: Rob Tillaart
//  VERSION: 0.1.04
//  PURPOSE: I2C scanner @different speeds
//  DATE: 2013-11-05
//  URL: http://forum.arduino.cc/index.php?topic=197360
//
// Released to the public domain
//

#include <Wire.h>
#include <Ethernet.h>


// scans devices from 50 to 800KHz I2C speeds.
// lower than 50 is not possible
// DS3231 RTC works on 800 KHz. TWBR = 2; (?)
const long speed[] = {                             // 'const' added
  50, 100, 200, 250, 400 };            // , 500, 800 };       // only up to 400 !
const int speeds = sizeof(speed)/sizeof(speed[0]);

// DELAY BETWEEN TESTS
#define RESTORE_LATENCY  5    // for delay between tests of found devices.
bool delayFlag = false;

// MINIMIZE OUTPUT
bool printAll = false;
bool header = true;


void MultiSpeedI2CScanner(EthernetClient *pClient)
{
  //  Wire.begin();          // already called in the sketch of my webserver

  pClient->println(F("<html>"));
  pClient->println(F("<head>"));
  pClient->println(F("<meta content=\"text/html; charset=UTF-8\" http-equiv=\"content-type\">"));
  pClient->println(F("<title>Multi Speed I2C scanner</title>"));
  
  // Make a nice style for the table.
  pClient->println(F("<style type=\"text/css\">"));
  pClient->println(F("table { color:#303030; border-width: 1px; border-color: #0000A0; border-collapse: collapse; }"));
  pClient->println(F("table th { border-width: 1px; padding: 6px; border-style: solid; border-color: #0000A0; background-color: #C0FFFF; }"));
  pClient->println(F("table td { border-width: 1px; padding: 6px; border-style: solid; border-color: #0000A0; background-color: #D0D0FF; }"));
  pClient->println(F("</style>"));
  
  pClient->println(F("</head>"));
  pClient->println(F("<body>"));
 
  I2Cscan( pClient);

  pClient->println(F("</body>"));
  pClient->println(F("</html>"));
}

void I2Cscan(EthernetClient *pClient)
{
  uint32_t startScan;
  uint32_t stopScan;
  
  startScan = millis();
  uint8_t count = 0;

  // The style is defined in the header.
  pClient->println(F("<table>"));
  pClient->println(F("<tbody>"));

  if (header)
  {
    pClient->print(F("<tr>"));
    pClient->print(F("<th colspan=\"8\">Multi Speed I2C scanner</th>"));
    pClient->println(F("</tr>"));
    
    pClient->print(F("<tr>"));
    pClient->print(F("<th>TIME</th>"));
    pClient->print(F("<th colspan=\"2\">Address</th>"));
    pClient->print(F("<th colspan=\"5\">Speed [kHz]</th>"));
    pClient->println(F("</tr>"));

    pClient->print(F("<tr>"));
    pClient->print(F("<th>&nbsp;</th>"));
    pClient->print(F("<th>DEC</th>"));
    pClient->print(F("<th>HEX</th>"));
    
    for (uint8_t s = 0; s < speeds; s++)
    {
      pClient->print(F("<th>"));
      pClient->print(speed[s]);
      pClient->print(F("</th>"));
    }
    
    pClient->println(F("</tr>"));
  }

  // TEST
  // 0.1.04: tests only address range 8..120
  // --------------------------------------------
  // Address	R/W Bit	Description
  // 0000 000   0	General call address
  // 0000 000   1	START byte
  // 0000 001   X	CBUS address
  // 0000 010   X	reserved - different bus format
  // 0000 011   X	reserved - future purposes
  // 0000 1XX   X	High Speed master code
  // 1111 1XX   X	reserved - future purposes
  // 1111 0XX   X	10-bit slave addressing
  for (uint8_t address = 8; address < 120; address++)
  {
    bool printLine = printAll;
    bool found[speeds];
    bool fnd = false;

    for (uint8_t s = 0; s < speeds ; s++)
    {
      TWBR = (F_CPU/(speed[s]*1000) - 16)/2;

      Wire.beginTransmission (address);
      found[s] = (Wire.endTransmission () == 0);
      fnd |= found[s];
      
      // give device 5 millis
      if (fnd && delayFlag) 
        delay(RESTORE_LATENCY);
    }

    if (fnd) count++;
    printLine |= fnd;

    if (printLine)
    {
      pClient->print(F("<tr>"));

      pClient->print(F("<td>"));
      pClient->print(millis());
      pClient->print(F("</td>"));

      pClient->print(F("<td>"));
      pClient->print(address, DEC);
      pClient->print(F("</td>"));

      pClient->print(F("<td>0x"));
      pClient->print(address, HEX);
      pClient->print(F("</td>"));

      for (uint8_t s = 0; s < speeds ; s++)
      {
        pClient->print(F("<td>"));
        pClient->print(found[s]? F("V"):F("."));
        pClient->print(F("</td>"));
      }
      pClient->println(F("</tr>"));

    }
  }

  pClient->println(F("</table>"));

  stopScan = millis();
  if (header)
  {
    pClient->println(F("
"));
    pClient->print(count);
    pClient->print(F(" devices found in "));
    pClient->print(stopScan - startScan);
    pClient->print(F(" milliseconds."));
    pClient->println(F("
"));
  }
}

The problem might be that the interrupts of printing interfere with the bits of the I2C bus. You need a logic analyser for that I guess.

I think that my I2C bus is crumbling down at 670kHz. The sketch for the webpage is the resulting sketch with the client.prints. I tested it with your sketch with and without Serial.prints, with and without delay and so on. I even did Serial.flush() everywhere to be sure that the Serial library was not longer busy. The result was still the same.

I was assuming that my I2C could be best at 100kHz, because of wires and Arduino Slaves, but now I feel confident to use 200kHz :grin:

Well, I didn't buy an oscilloscope (yet) : http://forum.arduino.cc/index.php?topic=281572.0

Hi,

for using Arduino Due you need at least Arduino IDE 1.5.8. The guys have changed some parts including wire. So you can use this tool if you replace this line from the code:

      TWBR = (F_CPU/(speed[s]*1000) - 16)/2;

with this part

#if ARDUINO >= 158
      Wire.setClock(speed[s]*1000);
#else
      TWBR = (F_CPU/(speed[s]*1000) - 16)/2;
#endif

I tried this with the Arduino nightly build of 1.6.0 and it works fine on my Due.

Best regards Nils

added this to the scanner 0.1.06 version

derniwi: Hi,

for using Arduino Due you need at least Arduino IDE 1.5.8. The guys have changed some parts including wire. So you can use this tool if you replace this line from the code:

      TWBR = (F_CPU/(speed[s]*1000) - 16)/2;

with this part

#if ARDUINO >= 158
      Wire.setClock(speed[s]*1000);
#else
      TWBR = (F_CPU/(speed[s]*1000) - 16)/2;
#endif

I tried this with the Arduino nightly build of 1.6.0 and it works fine on my Due.

Best regards Nils

I did it but ID.exe crashes while compiling !

Serial port Monitor returns this line : .."›ْ5گ.ضè,_ذPbڑMڑسح

any idea?

I'm using Mega2560 with RAMPS 1.4 and LCD is connected on "ReprapsDiscount Smart controller"

My problem is that lcd dos not start working !

do you have links to the RAMPS1.4 - LCD datasheets? what is a ReprapsDiscount Smart controller? how are these connected?

the I2C pins for a MEGA are different than on an UNO (did you use the right ones?)

For I2C you also need GND connected, and 4K7 pull up resistors are needed.

How do you power the device?

It looks like your PC uses an Arabic font? is that possible?

Started beta coding (0.1.07 beta) on support for scanning Wire and Wire1 if supported e.g. DUE.

If some other functionality is missing, please let me know. I might add it :)

robtillaart: do you have links to the RAMPS1.4 - LCD datasheets? what is a ReprapsDiscount Smart controller? how are these connected?

the I2C pins for a MEGA are different than on an UNO (did you use the right ones?)

For I2C you also need GND connected, and 4K7 pull up resistors are needed.

How do you power the device?

It looks like your PC uses an Arabic font? is that possible?

The red board at right is "ReprapsDiscount Smart controller" |500x445

باتشکر از یو آپلود برای میزبانی رایگان عکس

I did not do any pin or use any data sheets because all the boards are pre-installed ! |500x282

The board uses the usb power and an externall adaptor for stepmotors !

It is not "Arabic", It is "Farsi"

I found the problem, The baud rate in port scanner was wrong !

now the problem is "0 devices found in 346 milliseconds"

anw tnx for yr attention and yr codes !

It is not "Arabic", It is "Farsi" You are right, sorry

do you have some datasheet of that board? I'm not familiar with it

Np, u r welcome

In RepRap Wiki it is as below LCD Connect Schematics RepRapDiscount Controller Final Schematics

It seems that VDD pin power is 4.3v , is it the reason that no lcd is found by scanner codes even lcd's ledes turn on ?

how is the system powered?

ATX 12 V , 20 A and USB

robtillaart:
There are several good I2C scanners available for the Arduino.
However I missed the feature to scan if a device is reachable at different speeds.

So time to roll my own …

(I2C EEPROM 24LC256 attached to I2C bus)

when
#define PRINTALL false
the output looks like

Multispeed - I2C Scanner - V0.1 - 

ADDR ADDR 10 50 100 200 400 [KHz]

80 0x50 V V V V V

done…




when 
**#define PRINTALL true**
the output looks like


Multispeed - I2C Scanner - V0.1 -

ADDR ADDR 10 50 100 200 400 [KHz]

0 0x0 . . . . .
1 0x1 . . . . .
2 0x2 . . . . .
3 0x3 . . . . .
4 0x4 . . . . .
5 0x5 . . . . .
6 0x6 . . . . .
7 0x7 . . . . .
8 0x8 . . . . .
9 0x9 . . . . .
10 0xA . . . . .
11 0xB . . . . .
12 0xC . . . . .
13 0xD . . . . .
14 0xE . . . . .
15 0xF . . . . .
16 0x10 . . . . .
17 0x11 . . . . .
18 0x12 . . . . .
19 0x13 . . . . .
20 0x14 . . . . .
21 0x15 . . . . .
22 0x16 . . . . .
23 0x17 . . . . .
24 0x18 . . . . .
25 0x19 . . . . .
26 0x1A . . . . .
27 0x1B . . . . .
28 0x1C . . . . .
29 0x1D . . . . .
30 0x1E . . . . .
31 0x1F . . . . .
32 0x20 . . . . .
33 0x21 . . . . .
34 0x22 . . . . .
35 0x23 . . . . .
36 0x24 . . . . .
37 0x25 . . . . .
38 0x26 . . . . .
39 0x27 . . . . .
40 0x28 . . . . .
41 0x29 . . . . .
42 0x2A . . . . .
43 0x2B . . . . .
44 0x2C . . . . .
45 0x2D . . . . .
46 0x2E . . . . .
47 0x2F . . . . .
48 0x30 . . . . .
49 0x31 . . . . .
50 0x32 . . . . .
51 0x33 . . . . .
52 0x34 . . . . .
53 0x35 . . . . .
54 0x36 . . . . .
55 0x37 . . . . .
56 0x38 . . . . .
57 0x39 . . . . .
58 0x3A . . . . .
59 0x3B . . . . .
60 0x3C . . . . .
61 0x3D . . . . .
62 0x3E . . . . .
63 0x3F . . . . .
64 0x40 . . . . .
65 0x41 . . . . .
66 0x42 . . . . .
67 0x43 . . . . .
68 0x44 . . . . .
69 0x45 . . . . .
70 0x46 . . . . .
71 0x47 . . . . .
72 0x48 . . . . .
73 0x49 . . . . .
74 0x4A . . . . .
75 0x4B . . . . .
76 0x4C . . . . .
77 0x4D . . . . .
78 0x4E . . . . .
79 0x4F . . . . .
80 0x50 V V V V V
81 0x51 . . . . .
82 0x52 . . . . .
83 0x53 . . . . .
84 0x54 . . . . .
85 0x55 . . . . .
86 0x56 . . . . .
87 0x57 . . . . .
88 0x58 . . . . .
89 0x59 . . . . .
90 0x5A . . . . .
91 0x5B . . . . .
92 0x5C . . . . .
93 0x5D . . . . .
94 0x5E . . . . .
95 0x5F . . . . .
96 0x60 . . . . .
97 0x61 . . . . .
98 0x62 . . . . .
99 0x63 . . . . .
100 0x64 . . . . .
101 0x65 . . . . .
102 0x66 . . . . .
103 0x67 . . . . .
104 0x68 . . . . .
105 0x69 . . . . .
106 0x6A . . . . .
107 0x6B . . . . .
108 0x6C . . . . .
109 0x6D . . . . .
110 0x6E . . . . .
111 0x6F . . . . .
112 0x70 . . . . .
113 0x71 . . . . .
114 0x72 . . . . .
115 0x73 . . . . .
116 0x74 . . . . .
117 0x75 . . . . .
118 0x76 . . . . .
119 0x77 . . . . .
120 0x78 . . . . .
121 0x79 . . . . .
122 0x7A . . . . .
123 0x7B . . . . .
124 0x7C . . . . .
125 0x7D . . . . .
126 0x7E . . . . .
127 0x7F . . . . .

done…




I'm thinking about adding a few more features and make it menu driven , so one can do different tests without reloading.

as always, remarks and comments are welcome

latest code - https://github.com/RobTillaart/Arduino/tree/master/sketches/MultiSpeedI2CScanner - 


//
//    FILE: MultiSpeedI2CScanner.ino
//  AUTHOR: Rob Tillaart
// VERSION: 0.1.04
// PURPOSE: I2C scanner @different speeds
//    DATE: 2013-11-05
//     URL: http://forum.arduino.cc/index.php?topic=197360
//
// Released to the public domain
//

#include <Wire.h>
#include <Arduino.h>

// scans devices from 50 to 800KHz I2C speeds.
// lower than 50 is not possible
// DS3231 RTC works on 800 KHz. TWBR = 2; (?)
long speed = {
 50, 100, 200, 250, 400, 500, 800 };
const int speeds = sizeof(speed)/sizeof(speed[0]);

// DELAY BETWEEN TESTS
#define RESTORE_LATENCY  5    // for delay between tests of found devices.
bool delayFlag = false;

// MINIMIZE OUTPUT
bool printAll = true;
bool header = true;

// STATE MACHINE
enum states {
 STOP, ONCE, CONT, HELP };
states state = STOP;

uint32_t startScan;
uint32_t stopScan;

void setup()
{
 Serial.begin(115200);
 Wire.begin();
 displayHelp();
}

void loop()
{
 switch (getCommand())
 {
 case ‘s’:
   state = ONCE;
   break;
 case ‘c’:
   state = CONT;
   break;
 case ‘d’:
   delayFlag = !delayFlag;
   Serial.print(F("<delay="));
   Serial.println(delayFlag?F(“5>”):F(“0>”));
   break;
 case ‘e’:
   // eeprom test TODO
   break;
 case ‘h’:
   header = !header;
   Serial.print(F("<header="));
   Serial.println(header?F(“yes>”):F(“no>”));
   break;
 case ‘?’:
   state = HELP;
   break;
 case ‘p’:
   printAll = !printAll;
   Serial.print(F("<print="));
   Serial.println(printAll?F(“all>”):F(“found>”));
   break;
 case ‘q’:
   state = HELP;
   break;
 default:
   break;
 }

switch(state)
 {
 case ONCE:
   I2Cscan();
   state = HELP;
   break;
 case CONT:
   I2Cscan();
   delay(1000);
   break;    
 case HELP:
   displayHelp();
   state = STOP;
   break;
 case STOP:
   break;
 default: // ignore all non commands
   break;
 }
}

char getCommand()
{
 char c = ‘\0’;
 if (Serial.available())
 {
   c = Serial.read();
 }
 return c;
}

void displayHelp()
{
 Serial.println(F("\nArduino I2C Scanner - 0.1.03\n"));
 Serial.println(F("\ts = single scan"));
 Serial.println(F("\tc = continuous scan - 1 second delay"));
 Serial.println(F("\tq = quit continuous scan"));
 Serial.println(F("\td = toggle latency delay between successful tests."));
 Serial.println(F("\tp = toggle printAll - printFound."));
 Serial.println(F("\th = toggle header - noHeader."));
 Serial.println(F("\t? = help - this page"));
 Serial.println();
}

void I2Cscan()
{
 startScan = millis();
 uint8_t count = 0;

if (header)
 {
   Serial.print(F(“TIME\tDEC\tHEX\t”));
   for (uint8_t s = 0; s < speeds; s++)
   {
     Serial.print(F("\t"));
     Serial.print(speed[s]);
   }
   Serial.println(F("\t[KHz]"));
   for (uint8_t s = 0; s < speeds + 5; s++)
   {
     Serial.print(F("--------"));
   }
   Serial.println();
 }

// TEST
 // 0.1.04: tests only address range 8…120
 // --------------------------------------------
 // Address R/W Bit Description
 // 0000 000   0 General call address
 // 0000 000   1 START byte
 // 0000 001   X CBUS address
 // 0000 010   X reserved - different bus format
 // 0000 011   X reserved - future purposes
 // 0000 1XX   X High Speed master code
 // 1111 1XX   X reserved - future purposes
 // 1111 0XX   X 10-bit slave addressing
 for (uint8_t address = 8; address < 120; address++)
 {
   bool printLine = printAll;
   bool found[speeds];
   bool fnd = false;

for (uint8_t s = 0; s < speeds ; s++)
   {
     TWBR = (F_CPU/(speed[s]*1000) - 16)/2;
     Wire.beginTransmission (address);
     found[s] = (Wire.endTransmission () == 0);
     fnd |= found[s];
     // give device 5 millis
     if (fnd && delayFlag) delay(RESTORE_LATENCY);
   }

if (fnd) count++;
   printLine |= fnd;

if (printLine)
   {
     Serial.print(millis());
     Serial.print(F("\t"));
     Serial.print(address, DEC);
     Serial.print(F("\t0x"));
     Serial.print(address, HEX);
     Serial.print(F("\t"));

for (uint8_t s = 0; s < speeds ; s++)
     {
       Serial.print(F("\t"));
       Serial.print(found[s]? F(“V”):F("."));
     }
     Serial.println();
   }
 }

stopScan = millis();
 if (header)
 {
   Serial.println();
   Serial.print(count);
   Serial.print(F(" devices found in “));
   Serial.print(stopScan - startScan);
   Serial.println(F(” milliseconds."));
 }
}

I'm having an issue with the I2C scanners both the multispeed and the regular one.

I am using the Nucleo L476RG (STM32L476RGT6U).

The results for both the I2C scanner and the multispeed end up comming with nothing.

Using the code by Rob Tillaart V 0.1.06

TIME    DEC HEX     50  100 200 250 400 500 800 [KHz]
------------------------------------------------------------------------------------------------
55701   0   0x00        .   .   .   .   .   .   .
55703   1   0x01        .   .   .   .   .   .   .
55706   2   0x02        .   .   .   .   .   .   .
55709   3   0x03        .   .   .   .   .   .   .
55711   4   0x04        .   .   .   .   .   .   .
55714   5   0x05        .   .   .   .   .   .   .
55717   6   0x06        .   .   .   .   .   .   .
55719   7   0x07        .   .   .   .   .   .   .
55722   8   0x08        .   .   .   .   .   .   .
55725   9   0x09        .   .   .   .   .   .   .
55727   10  0x0A        .   .   .   .   .   .   .
55730   11  0x0B        .   .   .   .   .   .   .
55733   12  0x0C        .   .   .   .   .   .   .
55736   13  0x0D        .   .   .   .   .   .   .
55738   14  0x0E        .   .   .   .   .   .   .
55741   15  0x0F        .   .   .   .   .   .   .
55744   16  0x10        .   .   .   .   .   .   .
55747   17  0x11        .   .   .   .   .   .   .
55750   18  0x12        .   .   .   .   .   .   .
55752   19  0x13        .   .   .   .   .   .   .
55755   20  0x14        .   .   .   .   .   .   .
55758   21  0x15        .   .   .   .   .   .   .
55761   22  0x16        .   .   .   .   .   .   .
55763   23  0x17        .   .   .   .   .   .   .
55766   24  0x18        .   .   .   .   .   .   .
55769   25  0x19        .   .   .   .   .   .   .
55772   26  0x1A        .   .   .   .   .   .   .
55774   27  0x1B        .   .   .   .   .   .   .
55777   28  0x1C        .   .   .   .   .   .   .
55780   29  0x1D        .   .   .   .   .   .   .
55783   30  0x1E        .   .   .   .   .   .   .
55785   31  0x1F        .   .   .   .   .   .   .
55788   32  0x20        .   .   .   .   .   .   .
55791   33  0x21        .   .   .   .   .   .   .
55794   34  0x22        .   .   .   .   .   .   .
55796   35  0x23        .   .   .   .   .   .   .
55799   36  0x24        .   .   .   .   .   .   .
55802   37  0x25        .   .   .   .   .   .   .
55805   38  0x26        .   .   .   .   .   .   .
55807   39  0x27        .   .   .   .   .   .   .
55810   40  0x28        .   .   .   .   .   .   .
55813   41  0x29        .   .   .   .   .   .   .
55816   42  0x2A        .   .   .   .   .   .   .
55819   43  0x2B        .   .   .   .   .   .   .
55821   44  0x2C        .   .   .   .   .   .   .
55824   45  0x2D        .   .   .   .   .   .   .
55827   46  0x2E        .   .   .   .   .   .   .
55830   47  0x2F        .   .   .   .   .   .   .
55832   48  0x30        .   .   .   .   .   .   .
55835   49  0x31        .   .   .   .   .   .   .
55838   50  0x32        .   .   .   .   .   .   .
55841   51  0x33        .   .   .   .   .   .   .
55843   52  0x34        .   .   .   .   .   .   .
55846   53  0x35        .   .   .   .   .   .   .
55849   54  0x36        .   .   .   .   .   .   .
55852   55  0x37        .   .   .   .   .   .   .
55854   56  0x38        .   .   .   .   .   .   .
55857   57  0x39        .   .   .   .   .   .   .
55860   58  0x3A        .   .   .   .   .   .   .
55863   59  0x3B        .   .   .   .   .   .   .
55865   60  0x3C        .   .   .   .   .   .   .
55868   61  0x3D        .   .   .   .   .   .   .
55871   62  0x3E        .   .   .   .   .   .   .
55874   63  0x3F        .   .   .   .   .   .   .
55876   64  0x40        .   .   .   .   .   .   .
55879   65  0x41        .   .   .   .   .   .   .
55882   66  0x42        .   .   .   .   .   .   .
55885   67  0x43        .   .   .   .   .   .   .
55888   68  0x44        .   .   .   .   .   .   .
55890   69  0x45        .   .   .   .   .   .   .
55893   70  0x46        .   .   .   .   .   .   .
55896   71  0x47        .   .   .   .   .   .   .
55899   72  0x48        .   .   .   .   .   .   .
55901   73  0x49        .   .   .   .   .   .   .
55904   74  0x4A        .   .   .   .   .   .   .
55907   75  0x4B        .   .   .   .   .   .   .
55910   76  0x4C        .   .   .   .   .   .   .
55912   77  0x4D        .   .   .   .   .   .   .
55915   78  0x4E        .   .   .   .   .   .   .
55918   79  0x4F        .   .   .   .   .   .   .
55921   80  0x50        .   .   .   .   .   .   .
55923   81  0x51        .   .   .   .   .   .   .
55926   82  0x52        .   .   .   .   .   .   .
55929   83  0x53        .   .   .   .   .   .   .
55932   84  0x54        .   .   .   .   .   .   .
55934   85  0x55        .   .   .   .   .   .   .
55937   86  0x56        .   .   .   .   .   .   .
55940   87  0x57        .   .   .   .   .   .   .
55943   88  0x58        .   .   .   .   .   .   .
55945   89  0x59        .   .   .   .   .   .   .
55948   90  0x5A        .   .   .   .   .   .   .
55951   91  0x5B        .   .   .   .   .   .   .
55954   92  0x5C        .   .   .   .   .   .   .
55957   93  0x5D        .   .   .   .   .   .   .
55959   94  0x5E        .   .   .   .   .   .   .
55962   95  0x5F        .   .   .   .   .   .   .
55965   96  0x60        .   .   .   .   .   .   .
55968   97  0x61        .   .   .   .   .   .   .
55970   98  0x62        .   .   .   .   .   .   .
55973   99  0x63        .   .   .   .   .   .   .
55976   100 0x64        .   .   .   .   .   .   .
55979   101 0x65        .   .   .   .   .   .   .
55982   102 0x66        .   .   .   .   .   .   .
55984   103 0x67        .   .   .   .   .   .   .
55987   104 0x68        .   .   .   .   .   .   .
55990   105 0x69        .   .   .   .   .   .   .
55993   106 0x6A        .   .   .   .   .   .   .
55996   107 0x6B        .   .   .   .   .   .   .
55999   108 0x6C        .   .   .   .   .   .   .
56001   109 0x6D        .   .   .   .   .   .   .
56004   110 0x6E        .   .   .   .   .   .   .
56007   111 0x6F        .   .   .   .   .   .   .
56010   112 0x70        .   .   .   .   .   .   .
56013   113 0x71        .   .   .   .   .   .   .
56016   114 0x72        .   .   .   .   .   .   .
56019   115 0x73        .   .   .   .   .   .   .
56021   116 0x74        .   .   .   .   .   .   .
56024   117 0x75        .   .   .   .   .   .   .
56027   118 0x76        .   .   .   .   .   .   .
56030   119 0x77        .   .   .   .   .   .   .
56033   120 0x78        .   .   .   .   .   .   .
56036   121 0x79        .   .   .   .   .   .   .
56039   122 0x7A        .   .   .   .   .   .   .
56041   123 0x7B        .   .   .   .   .   .   .
56044   124 0x7C        .   .   .   .   .   .   .
56047   125 0x7D        .   .   .   .   .   .   .
56050   126 0x7E        .   .   .   .   .   .   .
56053   127 0x7F        .   .   .   .   .   .   .

0 devices found in 368 milliseconds.

Arduino I2C Scanner - 0.1.06

Scanmode:
    s = single scan
    c = continuous scan - 1 second delay
    q = quit continuous scan
    d = toggle latency delay between successful tests. 0 - 5 ms
Output:
    p = toggle printAll - printFound.
    h = toggle header - noHeader.
    a = toggle address range, 0..127 - 8..120
Speeds:
    0 = 50 - 800 Khz
    1 = 100 KHz only
    2 = 200 KHz only
    4 = 400 KHz only
    8 = 800 KHz only

    ? = help - this page

However if I address the device (BME280 0x76) on its own with no scanner I can RW to it without issues. Any Ideas?