|
@@ -0,0 +1,23 @@
|
|
|
|
|
+#!/usr/bin/python3
|
|
|
|
|
+
|
|
|
|
|
+import obd
|
|
|
|
|
+from obd import OBDStatus
|
|
|
|
|
+
|
|
|
|
|
+#obd.logger.setLevel(obd.logging.DEBUG)
|
|
|
|
|
+
|
|
|
|
|
+ocon = obd.OBD("/dev/pts/6",9600,None,fast=True,timeout=0.2)
|
|
|
|
|
+
|
|
|
|
|
+# initial statistics
|
|
|
|
|
+
|
|
|
|
|
+# VIN
|
|
|
|
|
+# FREEZE_DTCS
|
|
|
|
|
+Rfreeze = ocon.query(obd.commands['FREEZE_DTC'])
|
|
|
|
|
+# STATUS since last clear
|
|
|
|
|
+Rstatus = ocon.query(obd.commands['STATUS'])
|
|
|
|
|
+# number of warmups since last clear
|
|
|
|
|
+Rwarmup = ocon.query(obd.commands['WARMUPS_SINCE_DTC_CLEAR'])
|
|
|
|
|
+
|
|
|
|
|
+while True:
|
|
|
|
|
+
|
|
|
|
|
+ #print("RPM: " + str(ocon.query(obd.commands['RPM']).value) + " speed:" + str(ocon.query(obd.commands['SPEED']).value))
|
|
|
|
|
+ print("Lambda 1: " + str(ocon.query(obd.commands['O2_S1_WR_CURRENT']).value) + " Lambda 2: " + str(ocon.query(obd.commands['O2_S2_WR_CURRENT']).value) + " Lambda 3: " + str(ocon.query(obd.commands['O2_S3_WR_CURRENT']).value) + " Lambda 4: " + str(ocon.query(obd.commands['O2_S4_WR_CURRENT']).value) + " Lambda 5: " + str(ocon.query(obd.commands['O2_S5_WR_CURRENT']).value) + " Lambda 6: " + str(ocon.query(obd.commands['O2_S6_WR_CURRENT']).value) + " Lambda 7: " + str(ocon.query(obd.commands['O2_S7_WR_CURRENT']).value) + " Lambda 8: " + str(ocon.query(obd.commands['O2_S8_WR_CURRENT']).value))
|