Skip to content

ellisgl/x1022-pid-controller-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PID Controller for Node.JS based on the Arduino PID library.

Install npm install x1022-pid-controller-js

Really Basic Usage:

var pid      = require('x1022-pid-controller-js');
global.pCtrl = new pid({
    Kp : 1.0,
    Ki : 0.01,
    Kd : 0.01
    target: 120;
});

pCtrl.setInput(function()
{
     global.pCtrl.setIVal(getDataFromSensor());
});

pCtrl.setOutput(function(val)
{
    // Set port PWM port 10 to val.
    global.arduino.set(10, val);
});

pCtrl.start();

For a more complex usage, see https://github.com/ellisgl/Brewnoduino

About

PID controller for Node.JS. Based on the Arduino PID library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published