| Crates.io | obd2 |
| lib.rs | obd2 |
| version | 0.2.0-pre3 |
| created_at | 2023-05-15 03:41:48.462588+00 |
| updated_at | 2023-05-21 02:55:41.634446+00 |
| description | Utility for reading data from a vehicle over OBD-II |
| homepage | |
| repository | https://github.com/rsammelson/obd2 |
| max_upload_size | |
| id | 864696 |
| size | 425,378 |
obd2This library provides a user-friendly interface to automatically configure an ELM327 OBD-II to UART interface through an FTDI UART to USB interface (the entire setup is easily available online as an OBD-II to USB interface), and then send commands and receive data from a vehicle.
use obd2::{commands::Obd2DataRetrieval, device::Elm327, Obd2};
fn main() -> Result<(), obd2::Error> {
let mut device = Obd2::<Elm327>::default();
println!("VIN: {}", device.get_vin()?);
Ok(())
}
See the docs for more: https://docs.rs/obd2/