Updated sketches for TEI workshop

This commit is contained in:
Bill Verplank
2013-02-09 21:38:08 +01:00
parent 9260d066ba
commit bae5b3d412
12 changed files with 396 additions and 18 deletions
@@ -11,15 +11,17 @@ int xA, xB, foutA, foutB;
void setup(){
MotorA.init();
MotorB.init();
Music.init();
}
void loop(){
xA = analogRead(A0);
xB = analogRead(A3);
foutA = 6*(xB-xA); // this will peak at x=1024/6
MotorA.torque(foutA); // 1/4 or 1/2 ?
foutB = 6*(xA-xB); // this will peak at x=1024/6
foutA = 2*(xB-xA);
MotorA.torque(foutA);
foutB = 2*(xA-xB); // this will peak at x=1024/6
MotorB.torque(foutB); // 1/4 or 1/2 ?
}