I am currently working in a group project and we are trying to interface an OBD-II adapter and LCD monitor to an Uno. The current issue I am having is that OBD-II and TVout are both serial libraries even though TVout does not use the conventional digital 0 and 1 pins. If I comment out the OBD library the monitor displays text and image perfectly but as soon as the OBD-II commands are uncommented the screen remains black.
I was wondering if there is any solution to this. Possibly two Arduinos? Or using SoftwareSerial library? Although, I am not sure how to use it with the other two libraries.
Currently the best way to explain this problem is by showing a snippet of the coding.
The working code:
#include <TVout.h>
#include <video_gen.h>
#include <DistanceGP2Y0A21YK.h>
#include <Wire.h>
#include <LiquidCrystal.h>
#include <fontALL.h>
//#include <OBD.h>
//COBD obd;
TVout TV;
void setup()
{
TV.begin(0); //128x96 resolution
TV.select_font(font4x6); //Set font size
lcd.createChar(0, FC); //Creates full bar
Dist.begin(0); //Start infared sensor
lcd.begin(16,2); //Start LCD with # of columns and rows
//obd.begin(); //Start OBD-II adapter communication
//while(!obd.init()); //Keep trying till successful connection
pinMode(ButtonT, INPUT);
pinMode(ButtonP, INPUT);
lcd.print("hello");
TV.print("Welcome to MTTS");
}
This code successfully prints the string "Welcome to MTTS" on the monitor.
The not working code would be the same just uncomment out the obd sections.
I appreciate any guidance or ideas