Skip to content

barnhill/AndroidOBD

Repository files navigation

AndroidOBD CI API

Android OBD Library

What is this repository for?

This project offers a developer friendly interface to communicate with ELM 327 OBD devices via BLUETOOTH.

Usage

Add Dependency:

implementation 'com.pnuema.android:obd:1.4.3'

Code:

//Request MODE 1, PID 0C - RPM
val pid = PID(ObdModes.MODE_01, "0C")
val command = OBDCommand(pid)
command.run(bluetoothSocket.inputStream, bluetoothSocket.outputStream)

Log.d("PID", "${pid.description} : ${pid.calculatedResult}")
Log.d("PID Formatted Result", command.formattedResult)
//Clear DTCs - NonPermanent
val pid = PID(ObdModes.MODE_04) //Clear DTCs
val command = OBDCommand(pid)
command.run(bluetoothSocket.inputStream, bluetoothSocket.outputStream)

Who do I talk to?