 
   if(messageReceived == 1) {
     if(currentMillis - lastMillis >= interval) {
-      Serial.println("===screen refresh===");
       lastMillis = currentMillis;
       lcd.setCursor(4, 2);
       lcd.print(tgt);
-      Serial.print("===screen refresh===");
-      Serial.println(tgt);
+      //Serial.println(tgt);
+      Serial.println((double)badDataCount / (double)goodDataCount);
       
     }
     messageReceived = 0;    


tCAN emtpyMessage;

void setup() {

  lcd.createChar(0, fill1);

  //Serial.println("trying to get data");
  if(mcp2515_check_message()) {
    
    //Serial.print("there is a message ");
    mcp2515_get_message(message);
    
    if(message->data[0] >= 100) {
        tgt = (double)message->data[0] / 10.0;
        //Serial.print("good data ");
        //Serial.println(tgt);
        goodDataCount++;
    }
    else {
      ///Serial.println("bad data ");
      badDataCount++;
    }
    
    messageReceived = 1;
  }
  else {
    messageReceived = 0;
    //Serial.println("no data");
  }

}
