// simple turbo boost gauge for Arduino, 128x64 OLED display and a potentiometer
//
// based on the "u8glib_progress_bar" project by urish - https://wokwi.com/arduino/projects/300867986768527882
//
// created by upir
// full-length youtube tutorial: https://youtu.be/JXmw1xOlBdk
// links for tools used for this project:
// WOWKI emulator: https://wokwi.com/
// Start project from urish: https://wokwi.com/arduino/projects/300867986768527882
// Photopea (online graphics editor): https://www.photopea.com/
// Gamer font: https://www.dafont.com/gamer-2.font?text=-1+2+3+4+5+6+7+8+TURBO+turbo+boost
// Image2CPP tool: https://javl.github.io/image2cpp/
// Pressure sensor with Arduino: https://www.youtube.com/watch?v=MRNc7XUHBks
#include "U8glib.h"
// Function Initialization
// Check temperature function
int checkTemp() {
// Assigning value to variable
int fTemp = analogRead(A0);
return fTemp;
}
// Variable Initialization
int progress = 0; // progress of the gauge
int frame = 0; // frame for the inner part of the icon
int timer = 0;
int temp = 0;
int fanStatus = 0;
int megAniSel = 0;
int fphase = 0; // is used for an initial check for run animation
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_DEV_0 | U8G_I2C_OPT_NO_ACK | U8G_I2C_OPT_FAST); // Fast I2C / TWI
// U8GLIB_SSD1306_128X64 u8g(13, 11, 8, 9, 10); // SPI connection
// for SPI connection, use this wiring:
// GND > GND
// VCC > 5V
// SCL > 13
// SDA > 11
// RES > 10
// DC > 9
// CS > 8
// 'turbo_boost_preview', 128x64px
// this is a fullscreen preview from Photopea 128x64 size, not used for the final version
// note that when this image is not used, it is not placed in the memory
const unsigned char epd_bitmap_turbo_boost_preview [] PROGMEM = {
0xf8, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x0e, 0x7c, 0x00, 0x00, 0x1c, 0xf8, 0x00, 0x00, 0x00,
0xd8, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x06, 0x6c, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0x00, 0x00,
0xd8, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x06, 0x6c, 0x00, 0x00, 0x0c, 0xf8, 0x00, 0x00, 0x00,
0xd8, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x06, 0x6c, 0x00, 0x00, 0x0c, 0x18, 0x00, 0x00, 0x00,
0xd8, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x06, 0x6c, 0x00, 0x00, 0x0c, 0x18, 0x00, 0x00, 0x00,
0xf8, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x0f, 0x7c, 0x00, 0x00, 0x1e, 0xf8, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x20, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02,
0x20, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02,
0x20, 0x00, 0x40, 0x00, 0x40, 0x00, 0x80, 0x00, 0x80, 0x01, 0x00, 0x01, 0x00, 0x02, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x01, 0x55, 0x55, 0x55, 0x55,
0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xa9,
0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x01, 0x55, 0x55, 0x55, 0x55,
0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xa9,
0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x01, 0x55, 0x55, 0x55, 0x55,
0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xa9,
0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x01, 0x55, 0x55, 0x55, 0x55,
0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xa9,
0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x01, 0x55, 0x55, 0x55, 0x55,
0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xa9,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfc, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x20, 0x7e, 0xdb, 0xef, 0xbe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x20, 0x18, 0xdb, 0x6d, 0xb6, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x20, 0x18, 0xdb, 0x6f, 0x36, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x20, 0x3f, 0xfc, 0x20, 0x18, 0xdb, 0xcd, 0xb6, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x20, 0x49, 0x03, 0xc0, 0x18, 0xdb, 0x6d, 0xb6, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x40, 0xc9, 0x81, 0x00, 0x18, 0xfb, 0x6f, 0xbe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x41, 0x2a, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x41, 0x1c, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x41, 0xff, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x41, 0x1c, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x41, 0x2a, 0x41, 0x00, 0x7d, 0xf7, 0xdf, 0x7e, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x40, 0xc9, 0x81, 0x00, 0x6d, 0xb6, 0xd8, 0x18, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x20, 0x49, 0x02, 0x00, 0x79, 0xb6, 0xdf, 0x18, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x20, 0x3e, 0x02, 0x00, 0x6d, 0xb6, 0xc3, 0x18, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x6d, 0xb6, 0xdb, 0x18, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x7d, 0xf7, 0xdf, 0x18, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// 'bg_bottom', 64x24px
// bottom part of the background, including the icon and text
const unsigned char epd_bitmap_bg_bottom [] PROGMEM = {
0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfc, 0x20, 0x00, 0x00, 0x00, 0x00,
0x01, 0x80, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x20, 0x7e, 0xdb, 0xef, 0xbe, 0x10, 0x00, 0x00, 0x20, 0x18, 0xdb, 0x6d, 0xb6,
0x10, 0x00, 0x00, 0x20, 0x18, 0xdb, 0x6f, 0x36, 0x20, 0x3f, 0xfc, 0x20, 0x18, 0xdb, 0xcd, 0xb6,
0x20, 0x49, 0x03, 0xc0, 0x18, 0xdb, 0x6d, 0xb6, 0x40, 0xc9, 0x81, 0x00, 0x18, 0xfb, 0x6f, 0xbe,
0x41, 0x2a, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x1c, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00,
0x41, 0xff, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x1c, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00,
0x41, 0x2a, 0x41, 0x00, 0x7d, 0xf7, 0xdf, 0x7e, 0x40, 0xc9, 0x81, 0x00, 0x6d, 0xb6, 0xd8, 0x18,
0x20, 0x49, 0x02, 0x00, 0x79, 0xb6, 0xdf, 0x18, 0x20, 0x3e, 0x02, 0x00, 0x6d, 0xb6, 0xc3, 0x18,
0x10, 0x00, 0x04, 0x00, 0x6d, 0xb6, 0xdb, 0x18, 0x10, 0x00, 0x04, 0x00, 0x7d, 0xf7, 0xdf, 0x18,
0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x80, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// 'bg_top', 128x25px
// top part of the background, including the meter background, tickmarks and numbers
const unsigned char epd_bitmap_bg_top [] PROGMEM = {
0xf8, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x0e, 0x7c, 0x00, 0x00, 0x1c, 0xf8, 0x00, 0x00, 0x00,
0xd8, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x06, 0x6c, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0x00, 0x00,
0xd8, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x06, 0x6c, 0x00, 0x00, 0x0c, 0xf8, 0x00, 0x00, 0x00,
0xd8, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x06, 0x6c, 0x00, 0x00, 0x0c, 0x18, 0x00, 0x00, 0x00,
0xd8, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x06, 0x6c, 0x00, 0x00, 0x0c, 0x18, 0x00, 0x00, 0x00,
0xf8, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x0f, 0x7c, 0x00, 0x00, 0x1e, 0xf8, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x20, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02,
0x20, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02,
0x20, 0x00, 0x40, 0x00, 0x40, 0x00, 0x80, 0x00, 0x80, 0x01, 0x00, 0x01, 0x00, 0x02, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x55, 0x55, 0x55, 0x55,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xa9,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x55, 0x55, 0x55, 0x55,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xa9,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x55, 0x55, 0x55, 0x55,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xa9,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x55, 0x55, 0x55, 0x55,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xa9,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x55, 0x55, 0x55, 0x55,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xa9,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe
};
// 'bg_bottom2', 64x24px
// bottom part of the background, including the icon and the label
// the turbocharger icon is empty, as the spinning animation should be playing over the icon
const unsigned char epd_bitmap_bg_bottom2 [] PROGMEM = {
0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfc, 0x20, 0x00, 0x00, 0x00, 0x00,
0x01, 0x80, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x20, 0x7e, 0xdb, 0xef, 0xbe, 0x10, 0x00, 0x00, 0x20, 0x18, 0xdb, 0x6d, 0xb6,
0x10, 0x00, 0x00, 0x20, 0x18, 0xdb, 0x6f, 0x36, 0x20, 0x3f, 0xfc, 0x20, 0x18, 0xdb, 0xcd, 0xb6,
0x20, 0x41, 0x03, 0xc0, 0x18, 0xdb, 0x6d, 0xb6, 0x40, 0x80, 0x81, 0x00, 0x18, 0xfb, 0x6f, 0xbe,
0x41, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00,
0x41, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00,
0x41, 0x00, 0x41, 0x00, 0x7d, 0xf7, 0xdf, 0x7e, 0x40, 0x80, 0x81, 0x00, 0x6d, 0xb6, 0xd8, 0x18,
0x20, 0x41, 0x02, 0x00, 0x79, 0xb6, 0xdf, 0x18, 0x20, 0x3e, 0x02, 0x00, 0x6d, 0xb6, 0xc3, 0x18,
0x10, 0x00, 0x04, 0x00, 0x6d, 0xb6, 0xdb, 0x18, 0x10, 0x00, 0x04, 0x00, 0x7d, 0xf7, 0xdf, 0x18,
0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x80, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// 'anim_frame_1', 16x9px
// spinning inner part of the turbocharher icon, frame 1
const unsigned char epd_bitmap_anim_frame_1 [] PROGMEM = {
0x01, 0x00, 0x09, 0x20, 0x05, 0x40, 0x03, 0x80, 0x1f, 0xf0, 0x03, 0x80, 0x05, 0x40, 0x09, 0x20,
0x01, 0x00
};
// 'anim_frame_2', 16x9px
// spinning inner part of the turbocharher icon, frame 2
const unsigned char epd_bitmap_anim_frame_2 [] PROGMEM = {
0x00, 0x80, 0x04, 0x80, 0x02, 0xa0, 0x1f, 0xc0, 0x03, 0x80, 0x07, 0xf0, 0x0a, 0x80, 0x02, 0x40,
0x02, 0x00
};
// 'anim_frame_3', 16x9px
// spinning inner part of the turbocharher icon, frame 3
const unsigned char epd_bitmap_anim_frame_3 [] PROGMEM = {
0x02, 0x00, 0x02, 0x40, 0x0a, 0x80, 0x07, 0xf0, 0x03, 0x80, 0x1f, 0xc0, 0x02, 0xa0, 0x04, 0x80,
0x00, 0x80
};
// Array of all bitmaps for convenience. (Total bytes used to store images in PROGMEM = 144)
const int epd_bitmap_allArray_LEN = 3;
const unsigned char* epd_bitmap_allArray[3] = {
epd_bitmap_anim_frame_1,
epd_bitmap_anim_frame_2,
epd_bitmap_anim_frame_3
};
// 'megaman_standing_blink_right', 32x32px
const unsigned char megaman_standing_blink_right [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0xc0, 0x00, 0x00, 0x07, 0x20, 0x00, 0x00, 0x0f, 0x90, 0x00, 0x00, 0x1f, 0xf8, 0x00,
0x00, 0x1f, 0xcc, 0x00, 0x00, 0x2f, 0xfc, 0x00, 0x00, 0x2c, 0x34, 0x00, 0x00, 0x28, 0x04, 0x00,
0x00, 0x1b, 0xdc, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, 0xcd, 0xee, 0x00, 0x01, 0x84, 0x13, 0x00,
0x01, 0xc3, 0xe7, 0x00, 0x03, 0xd0, 0x17, 0x80, 0x03, 0xf0, 0x1f, 0x80, 0x03, 0xf0, 0x1f, 0x80,
0x03, 0xff, 0xff, 0x80, 0x01, 0xdf, 0xf7, 0x00, 0x00, 0x27, 0x88, 0x00, 0x00, 0x71, 0x0c, 0x00,
0x00, 0xfa, 0xbe, 0x00, 0x03, 0xfc, 0x7f, 0x80, 0x07, 0xfc, 0x7f, 0xc0, 0x07, 0xfc, 0x7f, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// 'megaman_standing_right', 32x32px
const unsigned char megaman_standing_right [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0xc0, 0x00, 0x00, 0x07, 0x20, 0x00, 0x00, 0x0f, 0x90, 0x00, 0x00, 0x1f, 0xf8, 0x00,
0x00, 0x1f, 0xcc, 0x00, 0x00, 0x2f, 0xfc, 0x00, 0x00, 0x2c, 0x34, 0x00, 0x00, 0x28, 0xd4, 0x00,
0x00, 0x18, 0xd4, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, 0xcd, 0xee, 0x00, 0x01, 0x84, 0x13, 0x00,
0x01, 0xc3, 0xe7, 0x00, 0x03, 0xd0, 0x17, 0x80, 0x03, 0xf0, 0x1f, 0x80, 0x03, 0xf0, 0x1f, 0x80,
0x03, 0xff, 0xff, 0x80, 0x01, 0xdf, 0xf7, 0x00, 0x00, 0x27, 0x88, 0x00, 0x00, 0x71, 0x0c, 0x00,
0x00, 0xfa, 0xbe, 0x00, 0x03, 0xfc, 0x7f, 0x80, 0x07, 0xfc, 0x7f, 0xc0, 0x07, 0xfc, 0x7f, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// 'megaman_swalk_right', 32x32px
const unsigned char megaman_swalk_right [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0xc0, 0x00, 0x00, 0x07, 0x20, 0x00, 0x00, 0x0f, 0x90, 0x00, 0x00, 0x1f, 0xf8, 0x00,
0x00, 0x1f, 0xcc, 0x00, 0x00, 0x2f, 0xfc, 0x00, 0x00, 0x2c, 0x34, 0x00, 0x00, 0x28, 0xd4, 0x00,
0x00, 0x18, 0xd4, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, 0xcd, 0xee, 0x00, 0x01, 0x84, 0x13, 0x00,
0x01, 0xc3, 0xe7, 0x00, 0x03, 0xd0, 0x17, 0x80, 0x03, 0xf0, 0x1f, 0x80, 0x03, 0xf0, 0x1f, 0x80,
0x03, 0xff, 0xff, 0x80, 0x01, 0xdf, 0xf7, 0x00, 0x00, 0x27, 0x88, 0x00, 0x00, 0x71, 0x18, 0x00,
0x00, 0xfb, 0xf8, 0x00, 0x03, 0xfd, 0xfe, 0x00, 0x07, 0xfd, 0xff, 0x00, 0x07, 0xfd, 0xff, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// Array of all bitmaps for convenience. (Total bytes used to store images in PROGMEM = 432)
const int megaman_ani_1_LEN = 3;
const unsigned char* megaman_ani_1[3] = {
megaman_standing_blink_right,
megaman_standing_right,
megaman_swalk_right
};
///////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////
// 'pixil-frame-0-blink-0', 32x24px
const unsigned char epd_bitmap_pixil_frame_0_blink_0 [] PROGMEM = {
0x00, 0x07, 0x00, 0x00, 0x00, 0x1c, 0x80, 0x00, 0x00, 0x3e, 0x40, 0x00, 0x00, 0x7f, 0xe0, 0x00,
0x00, 0x7f, 0x30, 0x00, 0x00, 0xbf, 0xf0, 0x00, 0x00, 0xb0, 0xd0, 0x00, 0x00, 0xa0, 0x10, 0x00,
0x00, 0x6f, 0x70, 0x00, 0x00, 0xe0, 0x10, 0x00, 0x03, 0x37, 0xb8, 0x00, 0x06, 0x10, 0x4c, 0x00,
0x07, 0x0f, 0x9c, 0x00, 0x0f, 0x40, 0x5e, 0x00, 0x0f, 0xc0, 0x7e, 0x00, 0x0f, 0xc0, 0x7e, 0x00,
0x0f, 0xff, 0xfe, 0x00, 0x07, 0x7f, 0xdc, 0x00, 0x00, 0x9e, 0x20, 0x00, 0x01, 0xc4, 0x30, 0x00,
0x03, 0xea, 0xf8, 0x00, 0x0f, 0xf1, 0xfe, 0x00, 0x1f, 0xf1, 0xff, 0x00, 0x1f, 0xf1, 0xff, 0x00
};
// 'pixil-frame-1-stand-1', 32x24px
const unsigned char epd_bitmap_pixil_frame_1_stand_1 [] PROGMEM = {
0x00, 0x07, 0x00, 0x00, 0x00, 0x1c, 0x80, 0x00, 0x00, 0x3e, 0x40, 0x00, 0x00, 0x7f, 0xe0, 0x00,
0x00, 0x7f, 0x30, 0x00, 0x00, 0xbf, 0xf0, 0x00, 0x00, 0xb0, 0xd0, 0x00, 0x00, 0xa3, 0x50, 0x00,
0x00, 0x63, 0x50, 0x00, 0x00, 0xe0, 0x10, 0x00, 0x03, 0x37, 0xb8, 0x00, 0x06, 0x10, 0x4c, 0x00,
0x07, 0x0f, 0x9c, 0x00, 0x0f, 0x40, 0x5e, 0x00, 0x0f, 0xc0, 0x7e, 0x00, 0x0f, 0xc0, 0x7e, 0x00,
0x0f, 0xff, 0xfe, 0x00, 0x07, 0x7f, 0xdc, 0x00, 0x00, 0x9e, 0x20, 0x00, 0x01, 0xc4, 0x30, 0x00,
0x03, 0xea, 0xf8, 0x00, 0x0f, 0xf1, 0xfe, 0x00, 0x1f, 0xf1, 0xff, 0x00, 0x1f, 0xf1, 0xff, 0x00
};
// 'pixil-frame-2-step-2', 32x24px
const unsigned char epd_bitmap_pixil_frame_2_step_2 [] PROGMEM = {
0x00, 0x07, 0x00, 0x00, 0x00, 0x1c, 0x80, 0x00, 0x00, 0x3e, 0x40, 0x00, 0x00, 0x7f, 0xe0, 0x00,
0x00, 0x7f, 0x30, 0x00, 0x00, 0xbf, 0xf0, 0x00, 0x00, 0xb0, 0xd0, 0x00, 0x00, 0xa3, 0x50, 0x00,
0x00, 0x63, 0x50, 0x00, 0x00, 0xe0, 0x10, 0x00, 0x03, 0x37, 0xb8, 0x00, 0x06, 0x10, 0x4c, 0x00,
0x07, 0x0f, 0x9c, 0x00, 0x0f, 0x40, 0x5e, 0x00, 0x0f, 0xc0, 0x7e, 0x00, 0x0f, 0xc0, 0x7e, 0x00,
0x0f, 0xff, 0xfe, 0x00, 0x07, 0x7f, 0xdc, 0x00, 0x00, 0x9e, 0x20, 0x00, 0x01, 0xc4, 0x60, 0x00,
0x03, 0xef, 0xe0, 0x00, 0x0f, 0xf7, 0xf8, 0x00, 0x1f, 0xf7, 0xfc, 0x00, 0x1f, 0xf7, 0xfc, 0x00
};
// 'pixil-frame-3-iwalk-3', 32x24px
const unsigned char epd_bitmap_pixil_frame_3_iwalk_3 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x03, 0x90, 0x00,
0x00, 0x07, 0xc8, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 0x0f, 0xe6, 0x00, 0x00, 0x77, 0xfe, 0x00,
0x01, 0x96, 0x1a, 0x00, 0x03, 0x94, 0x6a, 0x00, 0x07, 0xcc, 0x6a, 0xe0, 0x0f, 0xcc, 0x03, 0xf0,
0x0f, 0xa6, 0xf5, 0xf0, 0x0f, 0xa2, 0x0b, 0xf0, 0x07, 0x31, 0xf1, 0xe0, 0x01, 0xbc, 0x13, 0xc0,
0x03, 0xff, 0xab, 0x80, 0x07, 0xfc, 0x47, 0x00, 0x0f, 0xdc, 0x20, 0x00, 0x0f, 0xc6, 0x30, 0x00,
0x07, 0xcb, 0xf0, 0x00, 0x00, 0x73, 0xf8, 0x00, 0x00, 0x07, 0xfc, 0x00, 0x00, 0x07, 0xfc, 0x00
};
// 'pixil-frame-4-mwalk-4', 32x24px
const unsigned char epd_bitmap_pixil_frame_4_mwalk_4 [] PROGMEM = {
0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x01, 0xff, 0x80,
0x00, 0x01, 0xfc, 0xc0, 0x00, 0x02, 0xff, 0xc0, 0x00, 0x02, 0xc3, 0x40, 0x00, 0x06, 0x8d, 0x40,
0x00, 0x09, 0x8d, 0x40, 0x00, 0x11, 0x80, 0x40, 0x00, 0x20, 0xde, 0x80, 0x00, 0x22, 0x41, 0x00,
0x00, 0x1f, 0x3f, 0x00, 0x00, 0x1f, 0xc3, 0x80, 0x00, 0x0f, 0xe7, 0x80, 0x00, 0x07, 0xff, 0x00,
0x00, 0x03, 0xf4, 0x00, 0x00, 0x01, 0x94, 0x00, 0x00, 0x03, 0x18, 0x00, 0x00, 0x07, 0xf0, 0x00,
0x00, 0x0f, 0xe0, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 0x03, 0xf0, 0x00
};
// 'pixil-frame-5-fwalk-5', 32x24px
const unsigned char epd_bitmap_pixil_frame_5_fwalk_5 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x01, 0xc8, 0x00,
0x00, 0x03, 0xe4, 0x00, 0x00, 0x07, 0xfe, 0x00, 0x00, 0x07, 0xf3, 0x00, 0x00, 0x0b, 0xff, 0x00,
0x00, 0x0b, 0x0d, 0x00, 0x00, 0x3a, 0x35, 0x00, 0x00, 0xc6, 0x35, 0x00, 0x01, 0xe2, 0x01, 0x00,
0x03, 0xe4, 0x7a, 0x00, 0x03, 0xf8, 0x47, 0x00, 0x03, 0xe8, 0x3f, 0x80, 0x01, 0xdb, 0x3f, 0x80,
0x03, 0xfd, 0xbf, 0x80, 0x07, 0xef, 0xff, 0x00, 0x0f, 0xc7, 0x88, 0x00, 0x0f, 0xc7, 0x1c, 0x00,
0x07, 0xe8, 0xfc, 0x00, 0x00, 0x70, 0xfe, 0x00, 0x00, 0x01, 0xff, 0x00, 0x00, 0x01, 0xff, 0x00
};
// 'pixil-frame-6-shoot-6', 32x24px
const unsigned char epd_bitmap_pixil_frame_6_shoot_6 [] PROGMEM = {
0x00, 0x01, 0xc0, 0x00, 0x00, 0x07, 0x20, 0x00, 0x00, 0x0f, 0x90, 0x00, 0x00, 0x1f, 0xf8, 0x00,
0x00, 0x1f, 0xcc, 0x00, 0x00, 0x2f, 0xfc, 0x00, 0x00, 0xec, 0x34, 0x00, 0x03, 0x28, 0xd4, 0x00,
0x04, 0x18, 0xd4, 0x78, 0x0c, 0x18, 0x07, 0xfe, 0x0f, 0x4d, 0xec, 0xc5, 0x0f, 0xe4, 0x10, 0xff,
0x07, 0xf3, 0xe0, 0xfe, 0x03, 0xf0, 0x1f, 0x78, 0x01, 0xe0, 0x20, 0x00, 0x00, 0xf0, 0x40, 0x00,
0x00, 0x7f, 0xc0, 0x00, 0x00, 0xbf, 0x40, 0x00, 0x01, 0x1e, 0x20, 0x00, 0x03, 0x0c, 0x70, 0x00,
0x0f, 0x93, 0xf0, 0x00, 0x3f, 0xe3, 0xf8, 0x00, 0x7f, 0xc7, 0xfc, 0x00, 0x7f, 0xc7, 0xfc, 0x00
};
// 'pixil-frame-7-iwalkshoot-7', 32x24px
const unsigned char epd_bitmap_pixil_frame_7_iwalkshoot_7 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x07, 0x20, 0x00,
0x00, 0x0f, 0x90, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x1f, 0xcc, 0x00, 0x00, 0xef, 0xfc, 0x00,
0x03, 0x2c, 0x34, 0x00, 0x07, 0x28, 0xd4, 0x78, 0x0f, 0x98, 0xd7, 0xfe, 0x1f, 0x98, 0x04, 0xc5,
0x1f, 0x4d, 0xe8, 0xff, 0x1f, 0x44, 0x10, 0xfe, 0x0e, 0x63, 0xef, 0x78, 0x03, 0x78, 0x20, 0x00,
0x07, 0xff, 0x40, 0x00, 0x0f, 0xf8, 0x80, 0x00, 0x1f, 0xb8, 0x40, 0x00, 0x1f, 0x8c, 0x60, 0x00,
0x0f, 0x97, 0xe0, 0x00, 0x00, 0xe7, 0xf0, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 0x0f, 0xf8, 0x00
};
// 'pixil-frame-8-mwalkshoot-8', 32x24px
const unsigned char epd_bitmap_pixil_frame_8_mwalkshoot_8 [] PROGMEM = {
0x00, 0x01, 0xc0, 0x00, 0x00, 0x07, 0x20, 0x00, 0x00, 0x0f, 0x90, 0x00, 0x00, 0x1f, 0xf8, 0x00,
0x00, 0x1f, 0xcc, 0x00, 0x00, 0x2f, 0xfc, 0x00, 0x00, 0x2c, 0x34, 0x00, 0x00, 0x68, 0xd4, 0x78,
0x00, 0x98, 0xd7, 0xfe, 0x01, 0x18, 0x04, 0xc5, 0x02, 0x0d, 0xe8, 0xff, 0x02, 0x24, 0x10, 0xfe,
0x01, 0xf3, 0xff, 0x78, 0x01, 0xfc, 0x20, 0x00, 0x00, 0xfe, 0x40, 0x00, 0x00, 0x7f, 0xc0, 0x00,
0x00, 0x3f, 0x40, 0x00, 0x00, 0x19, 0x40, 0x00, 0x00, 0x31, 0x80, 0x00, 0x00, 0x7f, 0x00, 0x00,
0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00
};
// 'pixil-frame-9-fwalkshoot-9', 32x24px
const unsigned char epd_bitmap_pixil_frame_9_fwalkshoot_9 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x07, 0x20, 0x00,
0x00, 0x0f, 0x90, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x1f, 0xcc, 0x00, 0x00, 0x2f, 0xfc, 0x00,
0x00, 0x2c, 0x34, 0x00, 0x00, 0x28, 0xd4, 0x78, 0x00, 0x18, 0xd7, 0xfe, 0x00, 0x08, 0x04, 0xc5,
0x00, 0x11, 0xe8, 0xff, 0x00, 0x21, 0x1c, 0xfe, 0x00, 0x20, 0xff, 0xf8, 0x07, 0x6c, 0xfe, 0x00,
0x0f, 0xf6, 0xfe, 0x00, 0x1f, 0xbf, 0xfc, 0x00, 0x3f, 0x1e, 0x20, 0x00, 0x3f, 0x1c, 0x70, 0x00,
0x1f, 0xa3, 0xf0, 0x00, 0x01, 0xc3, 0xf8, 0x00, 0x00, 0x07, 0xfc, 0x00, 0x00, 0x07, 0xfc, 0x00
};
// Array of all bitmaps for convenience. (Total bytes used to store images in PROGMEM = 1120)
const int epd_bitmap_megaman_ani_2_LEN = 10;
const unsigned char* megaman_ani_2[10] = {
epd_bitmap_pixil_frame_0_blink_0,
epd_bitmap_pixil_frame_1_stand_1,
epd_bitmap_pixil_frame_2_step_2,
epd_bitmap_pixil_frame_3_iwalk_3,
epd_bitmap_pixil_frame_4_mwalk_4,
epd_bitmap_pixil_frame_5_fwalk_5,
epd_bitmap_pixil_frame_6_shoot_6,
epd_bitmap_pixil_frame_7_iwalkshoot_7,
epd_bitmap_pixil_frame_8_mwalkshoot_8,
epd_bitmap_pixil_frame_9_fwalkshoot_9
};
///////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////
void setup() {
u8g.setColorIndex(1); // set the color to white
pinMode(A0, INPUT); // set the pinmode for A0 to input to read the potentiometer value
}
// Draw to screen Function
int sDraw(int frame) {
u8g.firstPage();
do {
u8g.setColorIndex(1); // white color
u8g.drawBitmapP( 0, 0, 32/8, 24, megaman_ani_2[frame]);
} while ( u8g.nextPage() );
}
void loop() {
// Check temp and assign it to a variable
temp = checkTemp();
// Set fanStatus and turn fan on or off depending on temp
if (temp < 500) {
fanStatus = 0;
fphase = 0; // Needed for run animation
} else if (temp > 500) {
fanStatus = 1;
}
// Idle status animations
if (temp < 500 && fanStatus == 0) {
frame = 1;
sDraw(frame);
// Selects Megaman Animation
switch(megAniSel) {
case 0 ... 19: // Blink Once
frame = 0; // closed eye frame
sDraw(frame);
delay(250);
frame = 1; // open eye frame
sDraw(frame);
delay(500);
// Ending Idle Animation
delay(3000);
break;
case 20 ... 39: // No Blink
frame = 1; // open eye frame
sDraw(frame);
delay(500);
// Ending Idle Animation
delay(3000);
break;
case 40 ... 69: // Double Blink
frame = 1; // open eye frame
sDraw(frame);
delay(500);
frame = 0; // closed eye frame
sDraw(frame);
delay(100);
frame = 1; // open eye frame
sDraw(frame);
delay(100);
frame = 0; // closed eye frame
sDraw(frame);
delay(100);
frame = 1; // open eye frame
sDraw(frame);
delay(500);
// Ending Idle Animation
delay(3000);
break;
case 70 ... 89:
70 <= megAniSel <= 89;
frame = 0; // closed eye frame
sDraw(frame);
delay(100);
frame = 1; // open eye frame
sDraw(frame);
delay(500);
// Ending Idle Animation
delay(3000);
break;
}
}
// Running animation
if (temp > 500 && fanStatus == 1) {
// Selects Megaman Animation
switch(fphase) {
case 0: // Run
frame = 2; // step
sDraw(frame);
delay(100);
frame = 3; // iwalk
sDraw(frame);
delay(200);
frame = 4; // mwalk
sDraw(frame);
delay(200);
frame = 5; // fwalk
sDraw(frame);
delay(200);
frame = 4; // mwalk
sDraw(frame);
delay(200);
fphase = 1; // Needed for run animation
break;
case 1: // Run
frame = 3; // iwalk
sDraw(frame);
delay(200);
frame = 4; // mwalk
sDraw(frame);
delay(200);
frame = 5; // fwalk
sDraw(frame);
delay(200);
frame = 4; // mwalk
sDraw(frame);
delay(200);
break;
}
}
megAniSel = random(0, 100);
}