Hola a todos
Tengo una pantalla OLED con 4 pines (sin reset): http://www.ebay.es/itm/322142859009
Con la librería U8g2lib me funciona, pero me parpadea la pantalla. Y con la Adafruit SSD1306, no consigo que se vea algo.
Me he bajado las librerías desde Github.
Alguien tiene algún tipo de idea?
#include <Arduino.h>
#include <U8g2lib.h>
#include <Wire.h>
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // All Boards without Reset of the Display
void setup(void) {
u8g2.begin();
}
void loop(void) {
u8g2.clearBuffer(); // clear the internal memory
u8g2.setFont(u8g2_font_ncenB14_tr);
u8g2.setCursor(0, 45);
u8g2.print("Hola!");
u8g2.sendBuffer(); // transfer internal memory to the display
delay(1000);
}
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define OLED_RESET 4
//Adafruit_SSD1306 display(OLED_RESET);
Adafruit_SSD1306 display(-1);
#if (SSD1306_LCDHEIGHT != 64)
#error("Height incorrect, please fix Adafruit_SSD1306.h!");
#endif
void setup() {
Serial.begin(9600);
//display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
display.begin(SSD1306_SWITCHCAPVCC, 0x3C, false);
// Show image buffer on the display hardware.
// Since the buffer is intialized with an Adafruit splashscreen
// internally, this will display the splashscreen.
display.display();
delay(2000);
}
void loop() {
}