oled_disp.ino 537 Bytes
void init_disp(){
  Serial.begin(9600);
  Serial.println("Button checker");
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);  // initialize with the I2C addr 0x3C (for the 128x32)
  display.display();
  display.clearDisplay();
  scrolltext(lap);
  display.clearDisplay();  
}


void scrolltext(int lap) {
  display.setTextSize(2);
  display.setTextColor(WHITE);
  display.setCursor(2,0);
  display.clearDisplay();
  display.print("Lap : ");
  display.println(lap);
  display.display();
  delay(1); 
  display.startscrollleft(0x00, 0x0F);

}