Commit 65e010aa0b9c3f0fd9e9cef4f81ccdd1e21a1afd

Authored by msekar
1 parent 5187681c

Adafruit OLED display 128x32

Showing 1 changed file with 23 additions and 0 deletions   Show diff stats
oled_disp.ino 0 → 100644
... ... @@ -0,0 +1,23 @@
  1 +void init_disp(){
  2 + Serial.begin(9600);
  3 + Serial.println("Button checker");
  4 + display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3C (for the 128x32)
  5 + display.display();
  6 + display.clearDisplay();
  7 + scrolltext(lap);
  8 + display.clearDisplay();
  9 +}
  10 +
  11 +
  12 +void scrolltext(int lap) {
  13 + display.setTextSize(2);
  14 + display.setTextColor(WHITE);
  15 + display.setCursor(2,0);
  16 + display.clearDisplay();
  17 + display.print("Lap : ");
  18 + display.println(lap);
  19 + display.display();
  20 + delay(1);
  21 + display.startscrollleft(0x00, 0x0F);
  22 +
  23 +}
... ...