https://github.com/dominicrico/obd-parser-bluetooth-connection
https://github.com/dominicrico/obd-parser-bluetooth-connection
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dominicrico/obd-parser-bluetooth-connection
- Owner: dominicrico
- Created: 2017-03-14T15:20:12.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-04-13T16:54:31.000Z (about 5 years ago)
- Last Synced: 2025-02-02T21:08:20.692Z (4 months ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
obd-parser-bluetooth-connection
============================Connection module for use with _odb-parser_.
## Install
```
npm install obd-parser-bluetooth-connection
```## Usage
The typical usage scenario is described in the _obd-parser_ module docs, but
if you want to use this module to get a plain OBD connection you can use the
example code below as a start.```
var getConnector = require('obd-parser-bluetooth-connection');// Returns a function that will allow us to connect to the serial port
var connect = getConnector({
name: 'obd'
});connect(configureFunction)
.then(function () {
console.log('connected to bluetooth obd adapter!')
})
.catch(function (err) {
console.error('oh noes');
});function configureFunction (connection) {
return new Promise(function (resolve, reject) {
// Set up the obd connection etc.
conn.write('ATZ');
conn.write('ATE0');
});
}
```