Open BobTheShoplifter opened 6 years ago
that is really a great idea. i saw an esp32 a while ago with integrated oled. so if this project gets compatible with it we could see Informationen like ip address or some cool things like that.
Yes i want to be able to have it in the front/top of the case i am making but i think it should not be that hard to add to the code
I have some SSD1306 OLED displays that work really well with ESP8266. Remember to add 4.7k pull up resistors on SDA and SCL. I haven't tried it with McLighting but here is the code you are looking for:
#include <SSD1306.h> // https://github.com/ThingPulse/esp8266-oled-ssd1306
SSD1306 display(0x3c, D2, D1); // SDA = D2, SCL = D1
void displayInit() {
display.init();
display.flipScreenVertically();
display.setFont(ArialMT_Plain_24);
}
void displayInt(double dispInt, int x, int y) {
//display.setColor(WHITE);
display.setTextAlignment(TEXT_ALIGN_CENTER);
display.drawString(x, y, String(dispInt));
display.setFont(ArialMT_Plain_24);
display.display();
}
void displayString(String dispString, int x, int y) {
//display.setColor(WHITE);
display.setTextAlignment(TEXT_ALIGN_CENTER);
display.drawString(x, y, dispString);
display.setFont(ArialMT_Plain_24);
display.display();
}
setup() {
displayInit();
displayString("Welcome", 64, 15);
}
And of course go through some examples in ThingPlus SSD1306 library
Hi @gabenthegamer,
nice idea. I think the SSD1306 is the best pick. Cheap reliable and supports I2C. I used these before with the Adafruit library https://github.com/adafruit/Adafruit_SSD1306. It shouldn't be too complicated to use these to display status information. I ordered two, will try that out someday later.
Regards Tobias
Thanks! Tell me if you get it to work an what screen ordered
From: Tobias Blum notifications@github.com Sent: Thursday, May 10, 2018 5:40:30 PM To: toblum/McLighting Cc: Daniel; Mention Subject: Re: [toblum/McLighting] Oled Support (#162)
Hi @gabenthegamerhttps://github.com/gabenthegamer,
nice idea. I think the SSD1306 is the best pick. Cheap reliable and supports I2C. I used these before with the Adafruit library https://github.com/adafruit/Adafruit_SSD1306. It shouldn't be too complicated to use these to display status information. I ordered two, will try that out someday later.
Regards Tobias
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/toblum/McLighting/issues/162#issuecomment-388092670, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AVg7O4O91x2tjIqgf8mUrSL30nHIpY25ks5txF9ugaJpZM4T0uqt.
Any news on this ?
Hi, I didn‘t find time yet to look into this. The new Displays also did not arrive yet. Regards Tobias
@toblum I have these SSD1306 displays, I can whip something out if this is a priority? Currently busy with Google cloud stuff, once I figure that out I can work on this.
@debsahu No priorities at all, I would say. Just work on what you enjoy the most.
But this shouldn't be too complicated, I think. I did this before, but my current displays are glued to their enclosure in other projects I'm doing. :-)
Is it possible to support oled? Like when its just started it says "Connect to" And when its online it says "Running on " And when starting it says If so what oled display do i need to buy?