#include <U8g2lib.h>
#include <DFRobot_MPX5700.h>
// 0X3C+SA0 - 0x3C or 0x3D
#define I2C_ADDRESS 0x3C
// the setup routine runs once when you press reset:
U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/U8X8_PIN_NONE);
DFRobot_MPX5700 mpx5700(&Wire, I2C_ADDRESS);
//------------------------------------------------------------------------------
// Background Boost Image 128x64px
//------------------------------------------------------------------------------
const unsigned char my_bmp [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0c,
0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x02,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0f,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x11,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x11,
0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x0e,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
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, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf8, 0xff, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x06, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x08, 0xf0, 0xff, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x08, 0x28, 0x02, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x44, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x52, 0x09, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0xa2, 0x0c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x1a, 0x0b, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0xa6, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x52, 0x09, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x44, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x08, 0x88, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x08, 0xf0, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x20, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf8, 0x03, 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
};
//------------------------------------------------------------------------------
// Genesis Coupe Image 128x38px
//------------------------------------------------------------------------------
const unsigned char img_coupe [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf9, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x80, 0x07, 0xf8, 0xff, 0xff, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x60, 0x00, 0x27, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x1e, 0xf0, 0x20, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x01, 0x0e, 0x20, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x60, 0x80, 0x01, 0x20, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x1e, 0x80, 0x00, 0x20, 0x00, 0x00, 0x80, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xc0, 0xff, 0x01, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x20, 0x00, 0x00, 0x00, 0x06, 0x20, 0x00, 0x00, 0x00, 0x8c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0xfc, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00,
0xd0, 0x83, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0xe3, 0xff, 0x0f, 0x00, 0x00, 0x00,
0x30, 0x80, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0xf0, 0x3f, 0x00, 0x00,
0x10, 0x40, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0xc0, 0x01, 0x00,
0x10, 0x38, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00,
0x10, 0x07, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0xe0, 0x19, 0x00,
0xf0, 0x00, 0xc0, 0x3f, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x80, 0x7f, 0x10, 0x66, 0x00,
0x08, 0x00, 0x30, 0xc0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0x80, 0x61, 0x98, 0x00,
0x08, 0x00, 0x88, 0x1f, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x10, 0x3f, 0x82, 0x21, 0x01,
0x08, 0x00, 0x44, 0x20, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x88, 0x40, 0x04, 0x4e, 0x01,
0x04, 0x00, 0x24, 0x40, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x48, 0x80, 0x08, 0x30, 0x02,
0x04, 0x00, 0x12, 0x80, 0x04, 0x20, 0x00, 0x00, 0x00, 0x00, 0x04, 0x24, 0x00, 0x09, 0x00, 0x02,
0x04, 0x00, 0x09, 0x00, 0x09, 0x20, 0x00, 0x00, 0x00, 0x00, 0x02, 0x12, 0x00, 0x12, 0x00, 0x02,
0x04, 0x00, 0x05, 0x00, 0x0a, 0x40, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0a, 0x00, 0x24, 0x00, 0x02,
0x08, 0x80, 0x04, 0x00, 0x0a, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0a, 0x00, 0x24, 0x00, 0x04,
0x0c, 0x80, 0x04, 0x00, 0x12, 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, 0x09, 0x00, 0x24, 0xe0, 0x04,
0x02, 0x80, 0x04, 0x00, 0x12, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x00, 0x09, 0x00, 0x44, 0xe0, 0x02,
0x1e, 0x80, 0x04, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x44, 0xe0, 0x02,
0x70, 0x80, 0x04, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x44, 0xc0, 0x02,
0x80, 0x7f, 0x08, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x42, 0x00, 0x02,
0x00, 0x00, 0x10, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x41, 0x00, 0x04,
0x00, 0x00, 0x20, 0x40, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x41, 0x80, 0xc0, 0xff, 0x07,
0x00, 0x00, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00
};
// Array of all bitmaps for convenience. (Total bytes used to store images in PROGMEM = 1040)
const int my_bmp_LEN = 2;
const unsigned char* my_bmp_array[2] = {
my_bmp,
img_coupe
};
// When true, the intro animation will play
// Once the intro animation has completed, this will get set to false
bool show_intro = true;
// The follow two properties are to animate the x position of the car
float dist = 0;
float xPos = 0;
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
void setup() {
// Setup procedure for the display
u8g2.begin();
}
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
void createBorder() {
// Create/edit BMP file using GIMP
// Convert BMP file to C BYTE array using: https://javl.github.io/image2cpp/
// https://www.youtube.com/watch?v=K5e0lFRvZ2E
// https://wokwi.com/projects/358725862609555457
u8g2.drawXBMP(0, 0, 128, 64, my_bmp_array[0]);
}
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
void createBars(float numBars) {
int barWidth = 5;
int barHeight = 15;
float barSpacing = 3;
int maxBars = 15;
float x = 5;
int y = 15;
// Get the remainder to partially show the last bar
float remainder = fmod(numBars, 1);
// Convert to double
numBars = floor(numBars);
if (numBars < 0) {
numBars = 0;
} else if (numBars > maxBars) {
numBars = maxBars;
}
// ===============================================
// TESTING TEMP CODE TO TEST A SINGLE LINE RATHER THAN BARS
/*
float len = (float)numBars / 26 * 117;
u8g2.drawBox(x, y, len, barHeight);
return;
*/
// ===============================================
// Draws 1 to n bars
for (int i = 1; i <= numBars; i++) {
u8g2.drawBox(x, y, barWidth, barHeight);
x += barWidth + barSpacing;
}
// This will display the partial bar if num is not a whole number
if (remainder > 0 && numBars < 15) {
u8g2.drawBox(x, y, (int)(remainder * barWidth), barHeight);
}
}
//------------------------------------------------------------------------------
// This function will animate the car driving off of the screen as the intro
//------------------------------------------------------------------------------
void showIntroAnimation()
{
u8g2.drawXBMP(xPos, 15, 128, 38, my_bmp_array[1]);
u8g2.sendBuffer();
dist = (float)xPos/128 * 30;
xPos += 1 + dist;
// If xPos = 128 (width of screen), hide the car and stop the intro animation
if (xPos >= 128) {
u8g2.clearBuffer();
u8g2.drawXBMP(xPos, 15, 128, 38, my_bmp_array[1]);
u8g2.sendBuffer();
// Don't show the car animation anymore
show_intro = false;
delay(1000);
}
}
//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
void showBoost()
{
//Local atmospheric pressure
int atmpsi = 14.7;
const float sensorOffset = 112.0;
//float sensorValuehg = (analogRead(A0)-sensorOffset)/100.0; // calibration
float mapval = analogRead(A0);
float voltage = mapval * 0.0048828125; // 5/2^10 adc
// Break this down for readability ex:boost = (this / that) - 1 (why minus 1?)
float boost = (((float)((float)voltage - 5 * 0.04) / (5 * 0.0012858) / 100)) - 1; // kpa
// ===============================================
// TESTING - generate a random float between -14.99 - 14.99
/*
int randInt = random(0, 2600);
float randDecimal = (float)randInt / 100.0;
boost = randDecimal;
*/
// ===============================================
createBorder();
createBars(boost); // createBars(floor(boost));
u8g2.setFont(u8g_font_7x14B);
u8g2.setCursor(45, 55); // for the 0.00
String boostVal = String(boost, 2);
if (boost > 0.0 && boost < 10.0) {
boostVal = "0" + boostVal;
}
if (boost >= 0) {
u8g2.print(boostVal + " PSI");
} else {
u8g2.print(boostVal + " VAC");
}
u8g2.sendBuffer();
}
//------------------------------------------------------------------------------
void loop() {
u8g2.clearBuffer();
// Show the car animation until its x location >= 128 (off the screen)
if (show_intro) {
showIntroAnimation();
} else {
showBoost();
}
delay(100);
}