ThingPulse / esp8266-oled-ssd1306

Driver for the SSD1306 and SH1106 based 128x64, 128x32, 64x48 pixel OLED display running on ESP8266/ESP32
https://thingpulse.com
Other
2.02k stars 640 forks source link

Support for Arduino / AVR ATmega CPU ? #141

Closed kratochviljan closed 4 years ago

kratochviljan commented 7 years ago

Hello, first thank you for excellent OLED library. I'm using it on ESP8266 a lot! Now I'd like to use it on generic Arduino AVR Atmega MCU but I can't. I made change to architectures=* in library.properties file, but there are many errors during compilation. Hmmm, apparently these settings matters. So my question is: do you have plan to add support for AVR Atmega MCU?

Todelec commented 6 years ago

Hi,

changes I made to run library on Mega2560 with SH1106 display controller:

library.properties: Add "avr" to architectures. Should look like this architectures=esp8266,esp32,avr

SH1106Wire.h ... #ifdef __AVR #define _min(x,y) min(x,y) #define _max(x,y) max(x,y) #endif

bool connect() { #ifdef __AVR Wire.begin(); #else Wire.begin(this->_sda, this->_scl); #endif ...

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

harlock974 commented 5 years ago

Hi I tried Todelec fix for an Arduino UNO (ATMega 328), and change the déclaration to : SH1106 display(0x3c, A4, A5); to take into account SDA and SCL pins of the UNO.

No errors in compilation, but the display remains blank. Any ideas ?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.