 #include <LiquidCrystal.h>
 #include <math.h>
 
-//RS,EN,DB4,DB5,DB6,DB7
-LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
+//RS(4),EN(6),DB4(11),DB5(12),DB6(13),DB7(14)
+//                7  8  9  10  11  12
+LiquidCrystal lcd(14, 3, 4, 5, 6, 7);
 
-#define REDLITE 3 
-#define GREENLITE 5 
-#define BLUELITE 6
+//#define REDLITE 3 
+//#define GREENLITE 5 
+//#define BLUELITE 6
 
 int brightness = 255;
 

  
  //double afr = 12.5;
  //double tgt = 14.7;
  
  lcd.setCursor(4, 0);
  lcd.print(afr);
  lcd.setCursor(4, 2);
  lcd.print(tgt);
  
  draw_bar(afr, 1, 10, 20);
  draw_bar(tgt, 3, 10, 20);
  delay(500);
}

void draw_bar(double value, int row, double minimum, double maximum) {

  r = map(r, 0, 255, 255, 0);
  g = map(g, 0, 255, 255, 0);
  b = map(b, 0, 255, 255, 0);
  //analogWrite(REDLITE, r); 
  //analogWrite(GREENLITE, g); 
  //analogWrite(BLUELITE, b);
}


