buttplug-client
v0.0.6
Published
buttplug.io protocol implementation for server-side javascript
Downloads
2
Readme
buttplug-client
a simple buttplug.io nodejs implementation
buttplug.io protocol implementation for server-side javascript (nodejs) and interfacing with buttplug server applications like Intiface Desktop
- Interface with buttplug.io servers
- Easily program lovense and similiar products (Hush, Edge, Lush, etc.)
Basic Usage
var buttplugclient = require("buttplug-client").ButtplugClient()
buttplugclient.on("ready", function(ServerInfo) {
console.log(ServerInfo)
})
buttplugclient.on("DeviceAdded", function(device) {
// turn on all the motors at max power
console.log(device)
})
buttplugclient.connect("ws://localhost:12345")
setInterval(() => {
// get first device
var device = buttplugclient.Devices[0]
if (device) {
let p = (Math.sin(Date.now()/500)/2.5)+0.5
for (let i = 0; i < device.VibrateMotorCount; i++) {
device.Vibrate(i,p)
}
}
}, 200);