Skip to content

HID library for communicating with Concept2 performance monitor modules.

License

Notifications You must be signed in to change notification settings

mdeltito/node-concept2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-concept2

Build Status npm version

HID library for communicating with Concept2 performance monitor modules.

Description

This module provides a wrapper for node-hid for communicating with Concept2 performance monitors. It depends on node-csafe in order to communicate using the CSAFE protocol.

Installation

$ npm install --save concept2

Example

import Concept2 from concept2
import { Command } from csafe

// Connect to an available monitor (with vendor ID 6052)
const pm3 = new Concept2

// Listen for error a new-frame events.
pm3.on('error', (err) => {
  console.error(err)
})

pm3.on('frame', (frame) => {
  // Do something with the response!
  console.log(frame)
})

// Write a command to the device.
const getCadenceCmd = new Command('GetCadence')
pm3.write(getCadenceCmd)

Testing

$ npm test

License

The project is licensed under the MIT license.

About

HID library for communicating with Concept2 performance monitor modules.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published