Hi there,
i have an Adafruit-OLED 128x64 and SSD1306 Controller connected to Teensy 3.6 via SPI
It works but the text at the screen ist too large because there always empty rows in the display, independently from textsize.
Connected at an Arduino mini pro, everything ist fine.
Can somebody help?
Here the Code:
#include <Wire.h>
#include <Adafruit_SSD1306.h>
//Adafruit_SSD1306 display(OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);
#define OLED_RESET 23
Adafruit_SSD1306 display(OLED_RESET);
void setup()
{
display.begin(SSD1306_SWITCHCAPVCC, 0x3D);
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(0, 0);
display.clearDisplay();
}
void loop()
{
while (1)
{
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(0, 0);
display.clearDisplay();
display.println("Zeile 1");
display.println("Zeile 2");
display.println("Zeile 3");
display.println("Zeile 4");
display.display();
delay(20000); // wait for a second
display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(0, 0);
display.clearDisplay();
display.println("Zeile 1");
display.println("Zeile 2");
display.println("Zeile 3");
display.display();
delay(20000);
}
}
and picture:
Thx,
Andreas
i have an Adafruit-OLED 128x64 and SSD1306 Controller connected to Teensy 3.6 via SPI
It works but the text at the screen ist too large because there always empty rows in the display, independently from textsize.
Connected at an Arduino mini pro, everything ist fine.
Can somebody help?
Here the Code:
#include <Wire.h>
#include <Adafruit_SSD1306.h>
//Adafruit_SSD1306 display(OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);
#define OLED_RESET 23
Adafruit_SSD1306 display(OLED_RESET);
void setup()
{
display.begin(SSD1306_SWITCHCAPVCC, 0x3D);
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(0, 0);
display.clearDisplay();
}
void loop()
{
while (1)
{
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(0, 0);
display.clearDisplay();
display.println("Zeile 1");
display.println("Zeile 2");
display.println("Zeile 3");
display.println("Zeile 4");
display.display();
delay(20000); // wait for a second
display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(0, 0);
display.clearDisplay();
display.println("Zeile 1");
display.println("Zeile 2");
display.println("Zeile 3");
display.display();
delay(20000);
}
}
and picture:
Thx,
Andreas