From 7aff146ad7b3bdd70901f77b0aadfc32dbdd56f5 Mon Sep 17 00:00:00 2001 From: Stanley Huang Date: Sat, 5 Dec 2015 15:49:28 +1100 Subject: Update example sketches for OBD library --- libraries/OBD/examples/obd_uart_test/obd_uart_test.ino | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libraries/OBD/examples/obd_uart_test') diff --git a/libraries/OBD/examples/obd_uart_test/obd_uart_test.ino b/libraries/OBD/examples/obd_uart_test/obd_uart_test.ino index 944d6f2..adb68b0 100644 --- a/libraries/OBD/examples/obd_uart_test/obd_uart_test.ino +++ b/libraries/OBD/examples/obd_uart_test/obd_uart_test.ino @@ -13,8 +13,8 @@ // On Arduino Leonardo, Micro, MEGA or DUE, hardware serial can be used for output // as OBD-II adapter should connect to Serial1, otherwise we use software serial -SoftwareSerial mySerial(A2, A3); -//#define mySerial Serial +//SoftwareSerial mySerial(A2, A3); +#define mySerial Serial COBD obd; @@ -51,6 +51,9 @@ void testOut() void readPID() { static const byte pidlist[] = {PID_ENGINE_LOAD, PID_COOLANT_TEMP, PID_RPM, PID_SPEED, PID_TIMING_ADVANCE, PID_INTAKE_TEMP, PID_THROTTLE, PID_FUEL_LEVEL}; + mySerial.print('['); + mySerial.print(millis()); + mySerial.print(']'); for (byte i = 0; i < sizeof(pidlist) / sizeof(pidlist[0]); i++) { byte pid = pidlist[i]; bool valid = obd.isValidPID(pid); -- cgit v1.2.3