# include <U8glib.h>
# include <Wire.h>
# define BUSY 7
# define TEN 10
U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE);
void setup() {
// Wire.begin();
Serial.begin(115200);
pinMode(BUSY, OUTPUT);
// getShowTime();
}
int counter;
void loop()
{
digitalWrite(BUSY, HIGH);
loopz(); // drawRedraw(); // loopx();
digitalWrite(BUSY, LOW);
delay(400);
}
void loopz(void) {
u8g.firstPage();
do {
draw();
} while(u8g.nextPage());
}
void draw(void) {
u8g.setFont(u8g_font_unifont);
u8g.drawStr(0, 10, ".0 x 10");
u8g.drawStr(0, 24, ".0 x 24");
return;
}
int aCounter, bCounter;
unsigned char aBuffer[16];
void drawRedraw(void) {
u8g.firstPage();
do {
drawIt();
} while (u8g.nextPage() );
bCounter++;
aCounter +=17;
}
void drawIt(void) {
unsigned char slot, ii, theChar;
u8g.setFont(u8g_font_unifont);
u8g.drawStr( 0, TEN, "Zero.");
sprintf(aBuffer, "%04d", aCounter);
u8g.drawStr( 46, TEN, aBuffer);
sprintf(aBuffer, "%04d", bCounter);
u8g.drawStr( 90, TEN, aBuffer);
slot = 4;
// u8g.setFont(u8g_font_10x20r);
u8g.drawStr(0, 31, "-0123456789-");
}