#include "U8glib.h"
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_DEV_0 | U8G_I2C_OPT_NO_ACK | U8G_I2C_OPT_FAST); // Fast I2C / TWI
int progress = 0;
void setup() {
//font
u8g.setFont(u8g_font_tpssb);
u8g.setFont(u8g_font_04b_03);
u8g.setFont(u8g_font_8x13r);
u8g.setColorIndex(1);
}
void loop() {
u8g.firstPage();
do {
u8g.drawStr(33, 8, "Multiple");
u8g.drawStr( 17, 20, "Progress Bar");
u8g.drawStr( 14, 64, "WaK Wooooooow");
//bar a
u8g.drawFrame(0, 26, 62, 14);
u8g.drawBox(3, 29, progress, 8);
u8g.drawStr(4, 52, "Fuel %");
//bar b
u8g.drawFrame(66, 26, 62, 14);
u8g.drawBox(70, 29, progress, 8);
u8g.drawStr(70, 52, "Batt %");
} while ( u8g.nextPage() );
if (progress < 55) {
progress++;
} else {
progress = 0;
}
}
uno:A5.2
uno:A4.2
uno:AREF
uno:GND.1
uno:13
uno:12
uno:11
uno:10
uno:9
uno:8
uno:7
uno:6
uno:5
uno:4
uno:3
uno:2
uno:1
uno:0
uno:IOREF
uno:RESET
uno:3.3V
uno:5V
uno:GND.2
uno:GND.3
uno:VIN
uno:A0
uno:A1
uno:A2
uno:A3
uno:A4
uno:A5
ssd1306:GND
ssd1306:VCC
ssd1306:SCL
ssd1306:SDA