```
if (msecs > 30) {
if (peak1.available() && peak2.available()) {
msecs = 0;
float leftNumber = peak1.read();
float rightNumber = peak2.read();
int leftValue = (int)(leftNumber * 100);//better use int values
int rightValue = (int)(rightNumber * 100);
int leftGreen = map(leftValue,0,40,0,10);//all the colors mappings
int rightGreen = map(leftValue,0,40,0,10);
int leftOrange = map(leftValue,40,50,10,20);
int rightOrange = map(leftValue,40,50,10,20);
int leftYellow = map(leftValue,50,70,20,25);
int rightYellow = map(leftValue,50,70,20,25);
int leftRed = map(leftValue,70,100,25,30);
int rightRed = map(leftValue,70,100,25,30);
// draw the verticle bars LEFT
int height = leftNumber * 200;
if(leftValue > 0 && leftValue < 55){
tft.fillRect(20, 280 - leftGreen * 5, 20, leftGreen * 5, ILI9341_GREEN);
tft.fillRect(20, 280 - 200, 20, 200 - leftGreen * 5 , ILI9341_BLACK);}
if(leftValue > 50 && leftValue < 70){
tft.fillRect(20, 280 - leftOrange * 5, 20, leftOrange * 5, ILI9341_ORANGE);
tft.fillRect(20, 280 - 200, 20, 200 - leftOrange * 5 , ILI9341_BLACK);}
if(leftValue > 65 && leftValue < 75){
tft.fillRect(20, 250 - leftYellow * 5, 20, leftYellow * 5, ILI9341_YELLOW);
tft.fillRect(20, 250 - 200, 20, 200 - leftYellow * 5, ILI9341_BLACK);}
if(leftValue > 70 && leftValue < 100){
tft.fillRect(20, 230 - leftRed * 5, 20, leftRed * 5, ILI9341_RED);
tft.fillRect(20, 230 - 200, 20, 200 - leftRed * 5, ILI9341_BLACK);}
// draw the verticle bars RIGHT
if(rightValue > 0 && rightValue < 55){
tft.fillRect(65, 280 - rightGreen * 5, 20, rightGreen * 5, ILI9341_GREEN);
tft.fillRect(65, 280 - 200, 20, 200 - rightGreen * 5 , ILI9341_BLACK);}
if(rightValue > 50 && rightValue < 70){
tft.fillRect(65, 280 - rightOrange * 5, 20, rightOrange * 5, ILI9341_ORANGE);
tft.fillRect(65, 280 - 200, 20, 200 - rightOrange * 5 , ILI9341_BLACK);}
if(rightValue > 65 && rightValue < 75){
tft.fillRect(65, 250 - rightYellow * 5, 20, rightYellow * 5, ILI9341_YELLOW);
tft.fillRect(65, 250 - 200, 20, 200 - rightYellow * 5, ILI9341_BLACK);}
if(rightValue > 70 && rightValue < 100){
tft.fillRect(65, 230 - rightRed * 5, 20, rightRed * 5, ILI9341_RED);
tft.fillRect(65, 230 - 200, 20, 200 - rightRed * 5, ILI9341_BLACK);}
```