TaraHoleInIt / tarablessd1306_examples

Examples for the TarableSSD1306 component for the ESP32 and ESP-IDF SDK
MIT License
16 stars 9 forks source link

Display attaching failed #1

Open skitsanos opened 5 years ago

skitsanos commented 5 years ago

I think i have the display attaching issue, once i call SSD1306_I2CMasterAttachDisplayDefault(&I2CDisplay, I2CDisplayWidth, I2CDisplayHeight, I2CDisplayAddress, I2CResetPin) it all goes into a panic here: (default_if_i2c.c:107) ...

E (1524) I2CDefaultWriteBytes: i2c_master_cmd_begin( I2CPortNumber, CommandHandle, pdMS_TO_TICKS( 1000 ) ) != ESP_OK, result: 263

I'm on Wemos Lolin board with onboard 128x64 OLED (0x3C, SDA on 5, SCL on 4).

TaraHoleInIt commented 5 years ago

That error means it's timing out because it cannot communicate with the display. Since you're using different pins for SCL and SDA you need to change it from their defaults.

When you make menuconfig you should be able to find TarableSSD1306 under components and in there you can change the default pins for SCL and SDA.

skitsanos commented 5 years ago

That's exactly what i did actually and it is still dead... Although screen does inits with samples i took from https://github.com/TaraHoleInIt/ssd1306-esp32-idf-testing and i can put some text on...

TaraHoleInIt commented 5 years ago

Hm. I've just tried it with an esp32thing with SDA on 5 and SCL on 4 and it worked on the first try.

I don't see why it's timing out since both communications functions between code look pretty close, although ssd1306-esp32-idf-testing does no real error checking.

It shouldn't be hanging though, its set up to raise an error but not an abort when such events occur. This is a bit of a headscratcher though, and might be a bit difficult since I don't have that same board.

Are all of the examples failing the same way? It might be related to this but I'm not sure: https://www.esp32.com/viewtopic.php?t=6203