Move all to root dir to allow use by git clone

This commit is contained in:
Dan Rice
2014-05-06 16:54:44 -04:00
parent d21d7e3d09
commit 3574310135
6 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,31 @@
/********************************************************
* PID Basic Example
* Reading analog input 0 to control analog PWM output 3
********************************************************/
#include <PID_v1.h>
//Define Variables we'll be connecting to
double Setpoint, Input, Output;
//Specify the links and initial tuning parameters
PID myPID(&Input, &Output, &Setpoint,2,5,1, DIRECT);
void setup()
{
//initialize the variables we're linked to
Input = analogRead(0);
Setpoint = 100;
//turn the PID on
myPID.SetMode(AUTOMATIC);
}
void loop()
{
Input = analogRead(0);
myPID.Compute();
analogWrite(3,Output);
}