a node-js wrapper to cumuncate with your Kettler Ergometer... i only own a PX1 so its only tested with that...
npm i -S node-kettler
const Kettler = require("./kettler.js")
const k = new Kettler()
k.on("data",console.log)
await k.start()
const k = new Kettler({path: "/dev/ttyUSB0", interval: 100})
the interval in milliseconds at which the state will be requested from the device (default 100ms)
the path to your serialport. (default "/dev/ttyUSB0")
calls reset and starts a poling timer that polls every "interval" ms.
stops the polling timer
sets the power
resets all valus to zero
request current state of the device
k.on("data", callback)
will be fired whenever a change to the state of the device is detected
each field will cemit it's own event whenever it changes...
- pulse
- rpm
- speed
- distance
- power
- energy
- duration
- avg-power
k.on("avg-power", callback)