 #include <mcp_can.h>
 #include <mcp_can_dfs.h>
-#include <LiquidCrystal.h>
+//#include <LiquidCrystal.h>
+#include <SoftwareSerial.h>
 
 // SET UP PINS ///////////////////////////////////////////
 
-LiquidCrystal lcd(14, 3, 4, 5, 6, 7); //RS,EN,DB4,DB5,DB6,DB7
+//LiquidCrystal lcd(14, 3, 4, 5, 6, 7); //RS,EN,DB4,DB5,DB6,DB7
+SoftwareSerial lcd(0,3);
 const byte LED_PIN = 15;
 const byte SPI_CS_PIN = 10;
 

      else {
        lcd.write("           ");           //hard-coded value for quad mode
      }
      lcd.setCursor(column, row);
    }

    //calculate bars

  if(!octoModeReady) {
    clear_mode();
    //left column of labels
    setSerialCursor(lcd,0, 0);
    lcd.print(octoModeGauges[octoIndex][0]->shortLabel);
    setSerialCursor(lcd,0, 1);
    lcd.print(octoModeGauges[octoIndex][1]->shortLabel);
    setSerialCursor(lcd,0, 2);
    lcd.print(octoModeGauges[octoIndex][2]->shortLabel);
    setSerialCursor(lcd,0, 3);
    lcd.print(octoModeGauges[octoIndex][3]->shortLabel);

    //draw dividing line
    setSerialCursor(lcd,9, 0);
    lcd.write(byte(5));
    setSerialCursor(lcd,9, 1);
    lcd.write(byte(5));
    setSerialCursor(lcd,9, 2);
    lcd.write(byte(5));
    setSerialCursor(lcd,9, 3);
    lcd.write(byte(5));

    //right column of labels
    setSerialCursor(lcd,11, 0);
    lcd.print(octoModeGauges[octoIndex][4]->shortLabel);
    setSerialCursor(lcd,11, 1);
    lcd.print(octoModeGauges[octoIndex][5]->shortLabel);
    setSerialCursor(lcd,11, 2);
    lcd.print(octoModeGauges[octoIndex][6]->shortLabel);
    setSerialCursor(lcd,11, 3);
    lcd.print(octoModeGauges[octoIndex][7]->shortLabel);

    octoModeReady = true;
  }
  
  setSerialCursor(lcd,4, 0);
  if(is_current_value_shorter(*octoModeGauges[octoIndex][0])) {
    lcd.print(F("     "));
    setSerialCursor(lcd,4, 0);
  }
  lcd.print(octoModeGauges[octoIndex][0]->currentValue, octoModeGauges[octoIndex][0]->decimalPlaces);

  setSerialCursor(lcd,4, 1);
  if(is_current_value_shorter(*octoModeGauges[octoIndex][1])) {
    lcd.print(F("     "));
    setSerialCursor(lcd,4, 1);
  }
  lcd.print(octoModeGauges[octoIndex][1]->currentValue, octoModeGauges[octoIndex][1]->decimalPlaces);

  setSerialCursor(lcd,4, 2);
  if(is_current_value_shorter(*octoModeGauges[octoIndex][2])) {
    lcd.print(F("     "));
    setSerialCursor(lcd,4, 2);
  }
  lcd.print(octoModeGauges[octoIndex][2]->currentValue, octoModeGauges[octoIndex][2]->decimalPlaces);

  setSerialCursor(lcd,4, 3);
  if(is_current_value_shorter(*octoModeGauges[octoIndex][3])) {
    lcd.print(F("     "));
    setSerialCursor(lcd,4, 3);
  }
  lcd.print(octoModeGauges[octoIndex][3]->currentValue, octoModeGauges[octoIndex][3]->decimalPlaces);

  setSerialCursor(lcd,15, 0);
  if(is_current_value_shorter(*octoModeGauges[octoIndex][4])) {
    lcd.print(F("     "));
    setSerialCursor(lcd,15, 0);
  }
  lcd.print(octoModeGauges[octoIndex][4]->currentValue, octoModeGauges[octoIndex][4]->decimalPlaces);

  setSerialCursor(lcd,15, 1);
  if(is_current_value_shorter(*octoModeGauges[octoIndex][5])) {
    lcd.print(F("     "));
    setSerialCursor(lcd,15, 1);
  }
  lcd.print(octoModeGauges[octoIndex][5]->currentValue, octoModeGauges[octoIndex][5]->decimalPlaces);

  setSerialCursor(lcd,15, 2);
  if(is_current_value_shorter(*octoModeGauges[octoIndex][6])) {
    lcd.print(F("     "));
    setSerialCursor(lcd,15, 2);
  }
  lcd.print(octoModeGauges[octoIndex][6]->currentValue, octoModeGauges[octoIndex][6]->decimalPlaces);

  setSerialCursor(lcd, 15, 3);
  if(is_current_value_shorter(*octoModeGauges[octoIndex][7])) {
    lcd.print(F("     "));
    setSerialCursor(lcd, 15, 3);
  }
  lcd.print(octoModeGauges[octoIndex][7]->currentValue, octoModeGauges[octoIndex][7]->decimalPlaces);
}
