#include <TinyWireM.h>
#include <Tiny4kOLED.h>
void escreveLInha(int numLinha, String texto) {
int conta = 0;
String linha = "";
while (conta < 21) {
oled.setCursor(20 - conta, numLinha);
linha += texto[conta];
oled.print(linha);
conta++;
delay(20);
}
}
void startInfo() {
oled.clear();
delay(200);
escreveLInha(0, "....45678......567890");
delay(200);
escreveLInha(1, F("....456789....4567890"));
delay(200);
escreveLInha(2, F("...3456789...34567890"));
delay(200);
escreveLInha(3, F("...34567890.2345.7890"));
delay(200);
escreveLInha(4, F("..2345.78901234..7890"));
delay(200);
escreveLInha(5, F("..2345..890123...7890"));
delay(200);
escreveLInha(6, F(".123.....9012....7890"));
delay(200);
escreveLInha(7, F("0123......012....7890"));
}
void prepareDisplay() {
}
void setup() {
// put your setup code here, to run once:
oled.begin(128, 64, sizeof(tiny4koled_init_128x64br), tiny4koled_init_128x64br);
// Two fonts are supplied with this library, FONT8X16 and FONT6X8
oled.setFont(FONT6X8);
// To clear all the memory
oled.clear();
oled.on();
startInfo();
delay(3000);
prepareDisplay();
}
void loop() {
// put your main code here, to run repeatedly:
oled.clear();
}