iotappstory / ESP-Library

Software Distribution and Management Over the Air
GNU Lesser General Public License v2.1
124 stars 35 forks source link

Compatability with Wemos (Lolin) OLED shield v2.1.0 #101

Closed 877dev closed 4 years ago

877dev commented 5 years ago

Hi, First thanks to Christiaan Broeders for the help so far. I have run into the following issue when using Lolin OLED shield.

I am not using a button shield, as the OLED has buttons on it already (although they maybe need a LOLIN_I2C_BUTTON.h library to run). I can fit a button shield if you think it will help, but I heard in one of Andreas video that these integrated buttons are ok?

This is the shield, as you can see it already has buttons on it, and is 64 x 48 https://wiki.wemos.cc/products:d1_mini_shields:oled_shield

The OLED library I have on another project which works correctly: https://github.com/theiothing/Adafruit_SSD1306-esp8266-64x48

This is the code used (commented out the chipId part as suggested: https://codeshare.io/aV4VRR

Wemos D1 mini being used: https://wiki.wemos.cc/products:d1:d1_mini

RESULTS:

Total blank black screen on OLED, nothing shows.

Serial monitor displays the following: 15:37:35.958 -> 15:37:35.958 -> 15:37:35.958 -> ⸮⸮2⸮ 15:37:36.395 -> ets Jan 8 2013,rst cause:2, boot mode:(1,6) 15:37:36.395 -> 15:37:44.733 -> 15:37:44.733 -> ets Jan 8 2013,rst cause:4, boot mode:(1,6) 15:37:44.733 -> 15:37:44.733 -> wdt reset

Onno-Dirkzwager commented 5 years ago

Hi @877dev,

We developed the wemos example sketches for the 1.1.0 version oled shield. This did not have the extra buttons. The oled uses the same pins, Driver IC: SSD1306 and IIC Address: 0x3C or 0x3D. So I would expect this to work.

The buttons however will not work as they are I2C and the IOTAppStory library only alows you to use the gpio pins for buttons.

We did not realize these changes in the new shields and will update our examples in future releases.

Which sketch / app are you trying to use? And as mentioned above you will need a button. (wire to ground for button press will do)

877dev commented 5 years ago

Hi @Onno-Dirkzwager

Thanks for the help!

I have wired a button inbetween GND and D3 and it's still not working, there's nothing on the OLED and the same in terminal.

I am using the Wemos-IASLoader sketch. Here is code working with my 2.1.0 OLED and the Lolin library (see below): https://codeshare.io/GbRWE6

Links to libraries from Wemos/Lolin website (both work for me): https://wiki.wemos.cc/tutorials:shields:get_started_with_oled_shield

Command differences between the libraries:

eg. Wemos-IASLoader:

SSD1306 display(0x3c, D2, D1); display.init(); // setup OLED and show "Wait" display.flipScreenVertically(); display.clear(); display.setFont(ArialMT_Plain_16); display.setTextAlignment(TEXT_ALIGN_LEFT); display.drawString(48, 35, F("Wait")); display.display();

vs Lolin library:

Adafruit_SSD1306 display(OLED_RESET); display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
display.setRotation(2);
display.clearDisplay(); display.setTextSize(1); display.setCursor(0, 0); display.setTextColor(WHITE);

Do you think I could get your Wemos-IASLoader sketch working, with some editing? It's strange that even the terminal is not showing the correct text.

Many thanks 877dev

877dev commented 5 years ago

Update: Had a go changing the code and there's so many errors, I gave up.

Onno-Dirkzwager commented 5 years ago

As mentioned above we never made these examples for this shield. And it will take some time before its in the next release. Our apologies for this inconvenience.

Untill then just coninue using the normal IASLoader to add your device to our servers. You can still use your oled shield in your own projects with the libraries that work for you! Its just not compatible with our examples. yet....

Ill leave this issue open as a reminder untill we updated the examples.

877dev commented 5 years ago

@Onno-Dirkzwager I did not realise I could use the normal IASLoader, thank you.

PS - please let me know if you want anything testing in the meantime..

CwlBroeders commented 4 years ago

@877dev The wemos example sketches have been updated to work with the v2.1.0 OLED shield