diff options
author | Stanley Huang <stanleyhuangyc@gmail.com> | 2013-06-27 14:42:45 +0800 |
---|---|---|
committer | Stanley Huang <stanleyhuangyc@gmail.com> | 2013-06-27 14:42:45 +0800 |
commit | 17abc0d3cf9b226b06e5d62790a8d5e576846571 (patch) | |
tree | fd7eed9168345015b03db5b62cbb8119766a5452 /libraries/OBD/examples/rpm_led | |
parent | b74448509a44bc2be9a006827ede79be883efbd4 (diff) | |
download | 2021-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/rpm_led')
-rw-r--r-- | libraries/OBD/examples/rpm_led/rpm_led.ino | 6 |
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); |