SSD1306Ascii icon indicating copy to clipboard operation
SSD1306Ascii copied to clipboard

Add timeouts to i2c ?

Open penfold42 opened this issue 9 years ago • 4 comments

Great library - thanks!

Has anyone noticed that this hangs if there's no display present ?

penfold42 avatar Nov 19 '16 11:11 penfold42

Are you using Wire or the minimal AVR I2C driver?

The AVR I2C driver has two while loops that could hang.

  // AvrI2c.h line 120
  while (TWCR & (1 << TWSTO));

  // AvrI2c.h line 142
  while (!(TWCR & (1 << TWINT)));

greiman avatar Nov 19 '16 12:11 greiman

Right now I'm using avri2c but I will likely have to migrate to wire on an esp8266.

for now I'll maybe add a simple counter based timeout in those tight loops.

Thanks

penfold42 avatar Nov 19 '16 22:11 penfold42

I have the same issue, thanks. Is there some way to simply bypass the whole screen writing if a screen is not detected?

YiorgosTheo avatar Nov 26 '16 08:11 YiorgosTheo

for now, a counter timeout works just fine....

YiorgosTheo avatar Nov 26 '16 11:11 YiorgosTheo