summaryrefslogtreecommitdiff
path: root/samples/dashboard_1602
diff options
context:
space:
mode:
authorStanley Huang <stanleyhuangyc@gmail.com>2013-06-27 14:42:45 +0800
committerStanley Huang <stanleyhuangyc@gmail.com>2013-06-27 14:42:45 +0800
commit17abc0d3cf9b226b06e5d62790a8d5e576846571 (patch)
treefd7eed9168345015b03db5b62cbb8119766a5452 /samples/dashboard_1602
parentb74448509a44bc2be9a006827ede79be883efbd4 (diff)
download2021-arduino-obd-17abc0d3cf9b226b06e5d62790a8d5e576846571.tar.gz
2021-arduino-obd-17abc0d3cf9b226b06e5d62790a8d5e576846571.tar.bz2
2021-arduino-obd-17abc0d3cf9b226b06e5d62790a8d5e576846571.zip
update library API
Diffstat (limited to 'samples/dashboard_1602')
-rw-r--r--samples/dashboard_1602/dashboard_1602.ino8
1 files changed, 4 insertions, 4 deletions
diff --git a/samples/dashboard_1602/dashboard_1602.ino b/samples/dashboard_1602/dashboard_1602.ino
index cfabbe9..848800e 100644
--- a/samples/dashboard_1602/dashboard_1602.ino
+++ b/samples/dashboard_1602/dashboard_1602.ino
@@ -26,7 +26,7 @@ uint8_t modes[2] = {0, 2};
const char modePids[] = {PID_RPM, PID_SPEED, PID_THROTTLE, PID_ENGINE_LOAD,
PID_COOLANT_TEMP, PID_INTAKE_TEMP, PID_AMBIENT_TEMP, PID_MAF_FLOW,
- PID_ABS_ENGINE_LOAD, PID_FUEL_PRESSURE, PID_INTAKE_PRESSURE, PID_BAROMETRIC,
+ PID_ABS_ENGINE_LOAD, PID_FUEL_PRESSURE, PID_INTAKE_MAP, PID_BAROMETRIC,
PID_TIMING_ADVANCE, PID_FUEL_LEVEL, PID_RUNTIME, PID_DISTANCE};
const char* modeLabels[] = {
@@ -73,7 +73,7 @@ bool showData(int index)
uint8_t mode = modes[index];
uint8_t pid = modePids[mode];
digitalWrite(13, HIGH); // set the LED on
- if (!obd.ReadSensor(pid, value)) {
+ if (!obd.readSensor(pid, value)) {
// display received data on error
lcd.cursorTo(index + 1, 0);
lcd.printIn("Error");
@@ -99,7 +99,7 @@ bool setupConnection()
char buf[16];
lcd.clear();
lcd.printIn("Connecting...");
- while (!obd.Init()) {
+ while (!obd.init()) {
lcd.cursorTo(2, 0);
sprintf(buf, "Attempts #%d", ++errors);
lcd.printIn(buf);
@@ -115,7 +115,7 @@ void setup()
{
pinMode(13, OUTPUT); //we'll use the debug LED to output a heartbeat
lcd.init();
- OBDUART.begin(OBD_SERIAL_BAUDRATE);
+ obd.begin();
setupConnection();
}