summaryrefslogtreecommitdiff
path: root/libraries/OBD/examples/rpm_led
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/OBD/examples/rpm_led')
-rw-r--r--libraries/OBD/examples/rpm_led/rpm_led.ino36
1 files changed, 0 insertions, 36 deletions
diff --git a/libraries/OBD/examples/rpm_led/rpm_led.ino b/libraries/OBD/examples/rpm_led/rpm_led.ino
deleted file mode 100644
index 630336c..0000000
--- a/libraries/OBD/examples/rpm_led/rpm_led.ino
+++ /dev/null
@@ -1,36 +0,0 @@
-/*************************************************************************
-* Sample sketch based on OBD-II library for Arduino
-* Distributed under GPL v2.0
-* Copyright (c) 2012-2013 Stanley Huang <stanleyhuangyc@gmail.com>
-* All rights reserved.
-*************************************************************************/
-
-#include <Arduino.h>
-#include <Wire.h>
-#include <OBD.h>
-
-// OBD-II UART Adapter
-COBD obd;
-
-// OBD-II I2C Adapter
-//COBDI2C obd;
-
-void setup()
-{
- // we'll use the debug LED as output
- pinMode(13, OUTPUT);
- // start communication with OBD-II UART adapter
- obd.begin();
- // initiate OBD-II connection until success
- while (!obd.init());
-}
-
-void loop()
-{
- int 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);
- }
-}