The missing widgets

this my new code, thanks to @trystan4861

/*************** Progress bar ***************/
int Progress = 0;
int col;
int Flag = 0;
int Flag2 = 0;
bool Flag1 = true;
boolean PgrsTimer ;
WidgetLCD lcd(V18);

/************ VERTICAL BAR ******************/
String C[8] = {"\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u2588"}; 

/***********  HORIZONTAL BAR ***************/
String E[8] = {"\u2581","\u2582","\u2583","\u2584","\u2585","\u2586","\u2587","\u2588"} ;

void setup()
{
  PgrsTimer = timer.setInterval(100L, ProgressBar); 
  timer.disable(PgrsTimer);

 /***************** Initialize LCD *****************/
  Start();
}

/*********************** start button ************************/
  BLYNK_WRITE(V18) {// progressbar start
  timer.enable(PgrsTimer);
}

/************************* ProgressBar ******************/
void ProgressBar() {

  if (Progress < 100.01) {
    lcd.print(0, 0, "Progress " + String(Progress) + "%  ");
    Flag++;

/*******************  HORIZONTAL BAR ****************/
    lcd.print(col , 1, C[Flag - 1]);
    if (Flag == 8)
    {

/******************** VERTICAL BAR ******************/
      Flag2++;
      lcd.print(15 , 1, E[Flag2 - 1]);
      Flag = 0;
      col++;
    }

    Progress++;

  } else {
    lcd.print(13 , 1, C[7]);
    lcd.print(15 , 1, E[7]);
    col = 0;
    Flag=0;
    Flag2=0;
    Progress = 0;
    timer.disable(PgrsTimer);// end , stop timer
    timer.setTimer(500L, Completion, 10);  // Pulse msg  times
    timer.setTimer(6000L, Start, 1); // Start, new message
  }

}


/****************** blink msg *********************/
void Completion()
{
  lcd.print(0, 0, (Flag1) ? " completed 100% " : "                ");
  Flag1 = !Flag1;
}

/**************** press Start ***************/
void Start() {
  lcd.clear();
  lcd.print(1, 0, "Press START");
}
4 Likes