/** Program to create a car monitor display using: - Arduino Due - a TFT display (https://www.tinytronics.nl/shop/en/displays/tft/3.5-inch-tft-display-320*480-pixels-mega-compatible-ili9486) - ELM327 Bluetooth OBD2 scanner - FSC-DB004 (BT 836B) bluetooth module */ #include "Arduino.h" /* include UTFT library */ #include #include "obd2_display.h" // #include "obd2_timer.h" #define DEBUG 1 /* pins */ #define PIN_BT_RX 19 #define PIN_BT_TX 18 #define PIN_BT_STATE 3 /* connected/disconnected state of BT */ extern uint8_t BigFont[]; extern uint8_t SmallFont[]; char should_clear = 1; /* Set the pins for the display and dev board */ /* Standard Arduino Mega/Due shield : ,38,39,40,41 */ UTFT display(ILI9486,38,39,40,41); void setup() { randomSeed(analogRead(0)); #if (DEBUG == 1) Serial.begin(9600); #endif /* Serial1 is bluetooth module, pin 18 and 19. */ Serial1.begin(115200); /* Init display */ display.InitLCD(); display.setFont(BigFont); #if (DEBUG == 1) Serial.println("Starting"); #endif TCCR0A=(1<