#include <Arduino.h>
#include <font6x8.h>
#include <font8x16.h>
#include <ssd1306xled.h>
#include "image.h"
#include "image_two.h"
void setup()
{
_delay_ms(40);
SSD1306.ssd1306_init();
SSD1306.ssd1306_draw_bmp(0, 0, 128, 8, logo);
}
const uint8_t gauge_fill [] PROGMEM = { B11111111 }; //draw vertically with fill color
const uint8_t gauge_empty [] PROGMEM = { B00000000 }; //draw vertically with empty
int gauge_width = 30;
void loop() {
for(int i = 0; i < 112; i++)
{
if(i<gauge_width)
{
SSD1306.ssd1306_draw_bmp(8 + i, 2, 8 + i + 1, 3, gauge_fill);
}
else
{
SSD1306.ssd1306_draw_bmp(8 + i, 2, 8 + i + 1, 3, gauge_empty);
}
}
//gauge_width = (gauge_width + 1) % 112; //loop
gauge_width = gauge_width + 1 ; //once
}