From 17abc0d3cf9b226b06e5d62790a8d5e576846571 Mon Sep 17 00:00:00 2001 From: Stanley Huang Date: Thu, 27 Jun 2013 14:42:45 +0800 Subject: update library API --- libraries/OBD/examples/rpm_led/rpm_led.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libraries/OBD/examples/rpm_led') diff --git a/libraries/OBD/examples/rpm_led/rpm_led.ino b/libraries/OBD/examples/rpm_led/rpm_led.ino index c641736..9ebf34f 100644 --- a/libraries/OBD/examples/rpm_led/rpm_led.ino +++ b/libraries/OBD/examples/rpm_led/rpm_led.ino @@ -15,15 +15,15 @@ void setup() // we'll use the debug LED as output pinMode(13, OUTPUT); // start serial communication at the adapter defined baudrate - OBDUART.begin(OBD_SERIAL_BAUDRATE); + obd.begin(); // initiate OBD-II connection until success - while (!obd.Init()); + while (!obd.init()); } void loop() { int value; - if (obd.ReadSensor(PID_RPM, value)) { + if (obd.readSensor(PID_RPM, value)) { // RPM is read and stored in 'value' // light on LED when RPM exceeds 5000 digitalWrite(13, value > 5000 ? HIGH : LOW); -- cgit v1.2.3