I'm trying to make my Magic 8 Ball project smaller using an ATtiny85 but I can't seem to clear the screen after the trigger. It just adds the text to it. I tried a few different keywords using the library but here's what I have, right now.
Also how can I get one text show up below another? In the first rendition, "PRESS" was one word on top that dropped down when I put enough spaces and, "ME" was below it.
#include <TinyWireM.h>
#include <USI_TWI_Master.h>
#include <Tiny4kOLED.h>
long randNumber;
int button = 1;
int var = 0;
void setup() {
pinMode(button, INPUT);
oled.begin(128, 64, sizeof(tiny4koled_init_128x64br), tiny4koled_init_128x64br);
oled.clear();
oled.on();
oled.switchRenderFrame();
}
void loop() {
var = digitalRead(button);
oled.setFontX2(FONT8X16P);
oled.setCursor(0,21);
oled.println(F("PRESS ME!"));
if (var == 1){
oled.clear();
oled.setFont(FONT8X16P);
oled.setCursor(0,60);
oled.println(F("I'm in a meeting..."));
delay(2000);
return 0;
}
}