Changes

Jump to: navigation, search

Students/Tung Mach

64 bytes added, 18:00, 9 March 2010
Final Project Documentation
int cnt = 0;
int ledPin = 13;
int servoPin = 7; // Control pin 7 for servo motorint servoPin2 = 6; // Control pin 6 for servo motor
int pulseWidth = 0; // Amount to pulse the servo
int pulseWidth2 = 0;
Wire.begin ();
nunchuck_init ();
pinMode(servoPin, OUTPUT); // Set servo pin servoPin as an output pin pinMode(servoPin2, OUTPUT);// Set servoPin2 as an output pin
pulseWidth = minPulse; // Set the motor position to the minimum
pulseWidth2 = minPulse2;
int t = 0;
 
void loop()
{
if (cnt >= 5) {
 
// printNunchuckData();
 
int z_button = 0;
int c_button = 0;
 
if ((outbuf[5] >> 0) & 1)
z_button = 1;
}
}
 
cnt = 0;
send_zero();
 
} // if(t==)
 
updateServo // Update servo position
 
delay(dtime);
}
47
edits

Navigation menu