summaryrefslogtreecommitdiff
path: root/libraries/OBD/examples
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 /libraries/OBD/examples
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 'libraries/OBD/examples')
-rw-r--r--libraries/OBD/examples/rpm_led/rpm_led.ino6
1 files changed, 3 insertions, 3 deletions
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);