// Include the libraries.
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <Fonts/FreeSans9pt7b.h>
// important perameters
bool charging=true;
bool discharging=false;
bool isusb=false; //usb port connected = true, usb port not connected = false
bool islaptop=true; //dc port connected = true, dc port not connected = false
bool istypec=false; //typec port connected = true, typec port not connected = false
int voltageIndex = 0; // Index to track the current voltage in the list
String voltages[] = {"5V", "9V", "12V" , "15V", "16.5V", "19.5V", "20V","24V"}; // List of available voltages
float voltage=0;
int count=0;
int outvoltage=0;
//String setvoltage= voltages[voltageIndex];
float setvoltage =0;
int settemperature=0;
int currenttemperature=0;
int current=0;
int out_current=0;
int outpower=outvoltage*out_current;
int setpower=0;
int btn_status=0;
int batteryPercent = count;
const int toggleButtonPin = 2; // Replace with your button pin number
int buttonPushCounter = 1; // counter for the number of button presses
boolean buttonState = LOW; // current state of the button
boolean lastButtonState = LOW; // previous state of the butto
bool isYesSelected = true; // Initial state: Yes is selected
bool buttonWasPressed = false;
bool longPressDetected = false;
// Debounce parameters
unsigned long lastDebounceTime = 0; // the last time the output pin was toggled
unsigned long debounceDelay = 50; // the debounce time; increase if the output flickers
unsigned long pressStartTime = 0; // Added declaration
const unsigned long longPressDuration = 1000; // Adjust long-press duration as needed (in milliseconds)
static unsigned long lastToggleTime = 0;
int currentButtonState = digitalRead(toggleButtonPin);
const float rpiPicoVCC = 3.3;//Your RPI pico voltage
unsigned long ValueR1 = 100000;
unsigned long ValueR2 = 15000;
double Voltage_Source = 24;
const int snVoltagePin = 26;//the pin connecting the voltage.
const int inputResolution =4095;//works with most RPI pico boards
const float average_of = 500;//Average of 500 readings
//**************sensors
const int currentPin = 27; // Analog input pin for current
const int ACS712_mVperA = 100; // ACS712 sensitivity (mV per Ampere)
const int buck_sw = 12; //Buck trigger
const int boost_sw = 13; //Boost trigger
bool overVoltageDetected=true;
bool overCurrentDetected=false;
bool underVoltageDetected=false;
bool overTemperatureDetected=true;
Adafruit_SSD1306 display(128,64,&Wire,-1);
// Initial setup
void setup(){
//Draw Logo
logo();
// Set the button pin as an input
pinMode(snVoltagePin, INPUT);
pinMode(currentPin, INPUT);
pinMode(buck_sw, OUTPUT);
digitalWrite(buck_sw, HIGH);
pinMode(boost_sw, OUTPUT);
digitalWrite(boost_sw, HIGH);
pinMode(toggleButtonPin, INPUT);
}
// Main loop
void loop(){
voltagesetup();
readVoltage();
getVoltageAverage();
readcurrent();
navigation();
count +=1;
batteryPercent = count;
if(count>=100)
{count=0;}
switch (buttonPushCounter) {
case 1:
main_page();
break;
case 2:
settings_page();
voltage_setup();
break;
case 3:
settings_page();
battery_info();
break;
case 4:
settings_page();
poweroff();
break;
case 5:
settings_page();
exit();
break;
}
display.display();
button();
}
//////************************************** Define functions to call back *********************************************************\\\\\\
bool isToggleButtonPressed() {
return digitalRead(toggleButtonPin) == LOW;
}
void navigation(){
unsigned long currentTime = millis();
if (isToggleButtonPressed()) {
if (!buttonWasPressed) {
buttonWasPressed = true;
longPressDetected = false;
pressStartTime = millis(); // Record the press start time
}
if (currentTime - pressStartTime >= longPressDuration && !longPressDetected) {
longPressDetected = true;
if (isYesSelected) {
} else {
display.clearDisplay();
display.setCursor(30, 20);
display.println("Long press on YES!");
display.display();
delay(2000); // Display the message for 2 seconds (adjust as needed)
display.clearDisplay();
}
}
} else {
if (buttonWasPressed) {
buttonWasPressed = false;
// Button released after a press
if (!longPressDetected) {
// Toggle between "Yes" and "No" if no long press was detected
isYesSelected = !isYesSelected;
updateDisplay();
}
}
}
}
void button(){
bool redraw=false;
// Read the state of the switch into a local variable:
buttonState = digitalRead(toggleButtonPin);
// check to see if you just pressed the button
// (i.e. the input went from LOW to HIGH), and you've waited long enough
// since the last press to ignore any noise:
// If the switch changed, due to noise or pressing:
if (buttonState != lastButtonState) {
// reset the debouncing timer
lastDebounceTime = millis();
if (buttonState == HIGH) {
// if the current state is HIGH then the button
// went from off to on:
redraw=true;
buttonPushCounter++; // add one to counter
if (buttonPushCounter > 4) {
buttonPushCounter = 0;
}
Serial.println(buttonPushCounter);
}
lastButtonState = buttonState;
}
if (redraw == true ) {
display.clearDisplay();
}
}
void updateDisplay() {
display.clearDisplay();
// Display the selected option ("Yes" or "No") with a rectangle around it
if (isYesSelected) {
display.drawRoundRect(97, 36, 21, 15, 4, WHITE); // Rectangle around "Yes"
} else {
display.drawRoundRect(63, 36, 21, 15, 4, WHITE); // Rectangle around "No"
}
display.display();
}
//MAIN PAGE
void main_page(){
laptop();
usb();
typec();
charge_status();
power();
protection();
}
void laptop(){
// DC port occupied
if(islaptop==true){
display.drawRoundRect(0,0,20,20,4,WHITE);
display.setTextSize(2);
display.setCursor(5,3);
display.setTextColor(WHITE);
display.print("L");
display.display();
}
else{
display.print("");
}
}
void usb(){
// USB port occupied
if(isusb==true){
display.drawRoundRect(28,0,20,20,4,WHITE);
display.setTextSize(2);
display.setCursor(33,3);
display.setTextColor(WHITE);
display.print("U");
display.display();
}
else{
display.print("");
}
}
void typec(){
// Type C port occupied
if(istypec==true){
display.drawRoundRect(56,0,20,20,4,WHITE);
display.setTextSize(2);
display.setCursor(61,3);
display.setTextColor(WHITE);
display.print("C");
display.display();
}
else{
display.print("");
}
}
void charge_status(){
// Blink battery status and battery percentage indicator while charging
if(charging == true){
display.fillRoundRect(91, 5.5, 3, 7, 1, WHITE);//x,y,width,height top rect
display.drawRoundRect(95, 0, 30, 17, 4, WHITE);//x,y,width,height, radius bottom rect BATTERY
display.fillRoundRect(97, 2, 26, 13, 3, WHITE);//inside rectangle
display.setCursor(98,5);
display.setTextColor(BLACK);
display.setTextSize(1);
display.print(batteryPercent);
display.print("%");
display.display();
display.fillRoundRect(91, 5.5, 3, 7, 1, BLACK);//x,y,width,height top rect
display.drawRoundRect(95, 0, 30, 17, 4, BLACK);//x,y,width,height, radius bottom rect BATTERY
display.fillRoundRect(97, 2, 26, 13, 3, BLACK);//inside rectangle
display.setCursor(98,5);
display.setTextColor(WHITE);
display.setTextSize(1);
display.print(batteryPercent);
display.print("%");
delay(400);
}
//Static battery status and battery percentage indicator while discharging
else if(discharging == true){
display.fillRoundRect(91, 5.5, 3, 7, 1, WHITE);//x,y,width,height top rect
display.drawRoundRect(95, 0, 30, 17, 4, WHITE);//x,y,width,height, radius bottom rect BATTERY
display.fillRoundRect(97, 2, 26, 13, 3, WHITE);//inside rectangle
display.setCursor(98,5);
display.setTextSize(1);
display.setTextColor(BLACK);
display.print(batteryPercent);
display.print("%");
}
}
void power(){
//set voltage show for dc port
display.setTextColor(WHITE);
display.setTextSize(2);
display.setCursor(90,30);
display.println(voltages[voltageIndex]);
//OUT block
display.fillRoundRect(0,48, 22, 15, 3, WHITE);
display.setTextSize(1);
display.setCursor(3,52);
display.setTextColor(BLACK);
display.print("OUT");
//OUT POWER
display.setTextSize(2);
display.setCursor(30,50);
display.setTextColor(WHITE);
display.print("90 W");
//IN block
display.fillRoundRect(0,31, 22, 15, 3, WHITE);
display.setTextSize(1);
display.setCursor(5,35);
display.setTextColor(BLACK);
display.print("IN");
//IN POWER
display.setTextSize(2);
display.setCursor(30,30);
display.setTextColor(WHITE);
display.print("15 W");
display.display();
}
void protection(){
temperature();
vol();
curr();
}
void temperature(){
//Over temperature detection and indication
if(currenttemperature>settemperature){
display.fillRoundRect(90,48,17,15,2,WHITE);
display.setTextSize(1);
display.setCursor(93,52);
display.setTextColor(BLACK);
display.print("OT");
overTemperatureDetected==true;
display.display();
pinMode(buck_sw, OUTPUT);
digitalWrite(buck_sw, LOW);
pinMode(boost_sw, OUTPUT);
digitalWrite(boost_sw, LOW);
}
else{
display.print("");
}
}
void vol(){
//Overvoltage and Undervoltage detection and indication
if(voltage>setvoltage){
display.fillRoundRect(110,48,17,15,2,WHITE);
display.setTextSize(1);
display.setCursor(113,52);
display.setTextColor(BLACK);
overVoltageDetected==true;
display.print("OV");
pinMode(buck_sw, OUTPUT);
digitalWrite(buck_sw, LOW);
pinMode(boost_sw, OUTPUT);
digitalWrite(boost_sw, LOW);
}
else if(voltage<setvoltage){
display.fillRoundRect(110,48,17,15,2,WHITE);
display.setTextSize(1);
display.setCursor(113,52);
display.setTextColor(BLACK);
underVoltageDetected==true;
display.print("UV");
pinMode(buck_sw, OUTPUT);
digitalWrite(buck_sw, LOW);
pinMode(boost_sw, OUTPUT);
digitalWrite(boost_sw, LOW);
}
else{
display.print("");
}
}
void curr(){
//Overcurrent detection and indication
if(outpower>setpower){
display.fillRoundRect(110,48,17,15,2,WHITE);
display.setTextSize(1);
display.setCursor(113,52);
display.setTextColor(BLACK);
overCurrentDetected==true;
display.print("OC");
pinMode(buck_sw, OUTPUT);
digitalWrite(buck_sw, LOW);
pinMode(boost_sw, OUTPUT);
digitalWrite(boost_sw, LOW);
}
else{
display.print("");
}
}
//SETTING PAGE
void settings_page(){
//Settings main page
display.fillRoundRect(0,0,51,12,4,WHITE);
display.setTextSize(1);
display.setTextColor(BLACK);
display.setCursor(2,3);
display.println("SETTINGS");
//Layout blocks
display.drawRoundRect(0,15,51,49,4,WHITE); //Options block
display.drawRoundRect(54,0,74,64,4,WHITE); //Info block
//Options icon
display.fillRoundRect(4,18,20,20,4,WHITE);
display.setTextSize(2);
display.setTextColor(BLACK);
display.setCursor(9,21);
display.println("V");
display.fillRoundRect(27,18,20,20,4,WHITE);
display.setTextSize(2);
display.setTextColor(BLACK);
display.setCursor(32,21);
display.println("B");
display.fillRoundRect(4,40,20,20,4,WHITE);
display.setTextSize(2);
display.setTextColor(BLACK);
display.setCursor(9,43);
display.println("O");
display.fillRoundRect(27,40,20,20,4,WHITE);
display.setTextSize(2);
display.setTextColor(BLACK);
display.setCursor(32,43);
display.println("X");
display.display();
}
void voltage_setup(){
//Blinking
display.fillRoundRect(4,18,20,20,4,BLACK);
display.drawRoundRect(4,18,20,20,4,WHITE);
delay(300);
display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(9,21);
display.println("V");
//Selected option
display.drawRoundRect(54,0,74,12,4,WHITE);
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(70,2);
display.println("VOLTAGE");
display.drawRoundRect(72,11,39,12,4,WHITE);
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(77,13);
display.println("SETUP");
//Set voltage
update_Display();
//Change icon
display.fillRoundRect(59,50,39,11,4,WHITE);
display.setTextSize(1);
display.setTextColor(BLACK);
display.setCursor(61,52);
display.println("CHANGE");
display.display();
}
void battery_info(){
//Blinking
display.fillRoundRect(27,18,20,20,4,BLACK);
display.drawRoundRect(27,18,20,20,4,WHITE);
delay(300);
display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(32,21);
display.println("B");
//Selected option
display.drawRoundRect(54,0,74,12,4,WHITE);
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(70,2);
display.println("BATTERY");
display.drawRoundRect(73,11,35,12,4,WHITE);
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(79,13);
display.println("INFO");
//Percentage
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(57,27);
display.println("PERCENTAGE");
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(100,36);
display.println("100%");
//Set voltage
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(57,50);
display.println("VOLTAGE");
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(105,50);
display.println("24V");
display.display();
}
void poweroff(){
//Blink
display.fillRoundRect(4,40,20,20,4,BLACK);
display.drawRoundRect(4,40,20,20,4,WHITE);
delay(300);
display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(9,43);
display.println("O");
//Selected option
display.drawRoundRect(54,0,74,12,4,WHITE);
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(65,2);
display.println("POWER OFF");
//Choices
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(65,40);
display.println("NO");
display.fillRoundRect(100,36,21,15,4,WHITE);
display.setTextSize(1);
display.setTextColor(BLACK);
display.setCursor(102,40);
display.println("YES");
display.display();
}
void exit(){
//Blink
display.fillRoundRect(27,40,20,20,4,BLACK);
display.drawRoundRect(27,40,20,20,4,WHITE);
delay(300);
display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(32,43);
display.println("X");
//Selected option
display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(69,4);
display.println("EXIT");
display.drawLine(55,21,126,21, WHITE);
//Choices
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(65,40);
display.println("NO");
display.fillRoundRect(100,36,21,15,4,WHITE);
display.setTextSize(1);
display.setTextColor(BLACK);
display.setCursor(102,40);
display.println("YES");
display.display();
}
void readVoltage(){
int A0Value = analogRead(snVoltagePin);
float voltage_sensed = A0Value * (rpiPicoVCC / (float)inputResolution);
// Serial.print("voltage_sensed:");
// Serial.print(voltage_sensed);
//voltage = voltage_sensed * ( 1 + ( (float) ValueR2 / (float) ValueR1) );
}//readVoltage()
float getVoltageAverage(){
float voltage_temp_average=0;
for(int i=0; i < average_of; i++)
{
readVoltage();
voltage_temp_average +=voltage;
}
return voltage_temp_average / average_of;
}//getVoltageAverage
void readcurrent(){
int currentRaw = analogRead(currentPin); // Convert the raw ADC value to current (in Amperes)
float current = -(currentRaw - 2048) / ACS712_mVperA; // Assuming ACS712 output is centered at Vref/2
}
void voltagesetup(){
if (currentButtonState == LOW && !buttonWasPressed && buttonPushCounter==1) {
buttonWasPressed = true;
}
// Check for debouncing
if (currentButtonState == HIGH && buttonWasPressed) {
unsigned long currentTime = millis();
if (currentTime - lastToggleTime >= debounceDelay) {
// Button release detected
lastToggleTime = currentTime;
buttonWasPressed = false;
// Change the voltage to the next value in the list
voltageIndex = (voltageIndex + 1) % (sizeof(voltages) / sizeof(voltages[0]));
// Print the selected voltage to the serial monitor
Serial.print("Selected Voltage: ");
Serial.println(voltages[voltageIndex]);
}
}
}
void update_Display() {
// Display the selected voltage
display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(73, 29);
display.println(voltages[voltageIndex]);
// Your existing code for buttons and UI elements goes here
display.display();
}
void buck(){
}
void boost(){
}
void logo(){
// 'Logo bitmap with volta+', 128x64px
static const uint8_t image_data[1024]= {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x89, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xc8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xff,
0xff, 0xff, 0xff, 0xff, 0xcc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xd8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xfc, 0x00, 0x07, 0x81, 0x99, 0xf0, 0xfc, 0x38, 0xfe, 0x1e, 0x3f, 0x80, 0x7c, 0x7f, 0x0f, 0xff,
0xfc, 0x00, 0x07, 0x81, 0xff, 0xf0, 0xf8, 0x78, 0x7e, 0x1e, 0x3f, 0x00, 0x3c, 0x7e, 0x1f, 0xff,
0xfc, 0x00, 0x07, 0x80, 0xff, 0xf0, 0xf0, 0xf8, 0x3e, 0x1e, 0x3e, 0x04, 0x1c, 0x7c, 0x3f, 0xff,
0xfe, 0x00, 0x0f, 0x00, 0xff, 0xf0, 0xe1, 0xf8, 0x3e, 0x1e, 0x3c, 0x3f, 0x3c, 0x78, 0x7f, 0xff,
0xff, 0xe0, 0xff, 0x00, 0x7f, 0xf0, 0xc3, 0xf8, 0x1e, 0x1e, 0x38, 0x7f, 0xfc, 0x70, 0xff, 0xff,
0xff, 0xe0, 0xfe, 0x00, 0x7f, 0xf0, 0x87, 0xf8, 0x0e, 0x1e, 0x38, 0x7f, 0xfc, 0x61, 0xff, 0xff,
0xff, 0xe0, 0xfe, 0x08, 0x3f, 0xf0, 0x07, 0xf8, 0x06, 0x1e, 0x38, 0xff, 0xfc, 0x03, 0xff, 0xff,
0xff, 0xe0, 0xfc, 0x18, 0x3f, 0xf0, 0x07, 0xf8, 0x82, 0x1e, 0x38, 0xff, 0xfc, 0x03, 0xff, 0xff,
0xff, 0xe0, 0xfc, 0x1c, 0x3f, 0xf0, 0x03, 0xf8, 0xc0, 0x1e, 0x38, 0xff, 0xfc, 0x01, 0xff, 0xff,
0xff, 0xe0, 0xf8, 0x00, 0x1f, 0xf0, 0x03, 0xf8, 0xe0, 0x1e, 0x38, 0x7f, 0xfc, 0x00, 0xff, 0xff,
0xff, 0xe0, 0xf8, 0x00, 0x1f, 0xf0, 0x61, 0xf8, 0xf0, 0x1e, 0x38, 0x7f, 0xfc, 0x30, 0x7f, 0xff,
0xff, 0xe0, 0xf0, 0x00, 0x0f, 0xf0, 0xf0, 0xf8, 0xf8, 0x1e, 0x3c, 0x3f, 0x3c, 0x38, 0x7f, 0xff,
0xff, 0xe0, 0xf0, 0x00, 0x0f, 0xf0, 0xf0, 0x78, 0xf8, 0x1e, 0x3c, 0x0e, 0x1c, 0x7c, 0x3f, 0xff,
0xff, 0xe0, 0xf0, 0x7e, 0x07, 0xf0, 0xf8, 0x78, 0xfc, 0x1e, 0x3e, 0x00, 0x1c, 0x7e, 0x1f, 0xff,
0xff, 0xe0, 0xe0, 0xff, 0x07, 0xf0, 0xfc, 0x38, 0xfe, 0x1e, 0x3f, 0x80, 0x7c, 0x7f, 0x0f, 0xff,
0xff, 0xe1, 0xf1, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
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, 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, 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, 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
};
// (internal charge ckt ON,I2C address)
display.begin(SSD1306_SWITCHCAPVCC,0X3C);
delay(1000);
display.clearDisplay();
delay(200);
// Draw bitmap on the screen
display.drawBitmap(5, 10, image_data, 128, 64,1);
display.setTextSize(2);
display.setCursor(55,50);
display.setTextColor(WHITE);
display.print("VOLTA+");
display.display();
delay(2000);
display.clearDisplay();
}