void setup() { portMode(0, INPUT) ; // ***** from 253 template file portMode(1, INPUT) ; // ***** from 253 template file }
void setup() { portMode(0, INPUT) ; // ***** from 253 template file portMode(1, INPUT) ; // ***** from 253 template file RCServo0.attach(RCServo0Output) ; RCServo1.attach(RCServo1Output) ; RCServo2.attach(RCServo2Output) ; }
void setup() { //to prevent fuse from blowing motor.speed(leftWheelPin, 0) ; motor.speed(rightWheelPin, 0) ; //attach driving servo RCServo1.attach(RCServo1Output) ; RCServo1.write(neutral) ; //set ports to inputs portMode(0, INPUT) ; portMode(1, INPUT) ; Serial.begin(9600); while(1){ delay(50); while( !(stopbutton()) ){ delay(50); LCD.setCursor(0,0); LCD.clear(); LCD.home() ; LCD.print("kP"); LCD.print(" "); LCD.print(kP); kP = knob(knob_one)/10; LCD.print(" "); LCD.setCursor(0,1); LCD.print("kD"); LCD.print(" "); LCD.print(kD); kD = knob(knob_two)/10; if (startbutton()) { goto loopstart; } } delay(50); while( !(stopbutton())) { delay(50); LCD.setCursor(0,0); LCD.clear(); LCD.home() ; LCD.print("motorSpeed"); LCD.print(" "); LCD.print(motorSpeed); motorSpeed = knob(knob_two); LCD.setCursor(0,1); LCD.print("Adjust"); LCD.print(" "); LCD.print(knob(knob_one)); motorAdjustment = knob(knob_one)/512; if (startbutton()) { goto loopstart; } } } loopstart: ; }
void setup() { portMode(0, INPUT); LCD.clear(); LCD.home(); LCD.setCursor(0,0); LCD.print("Wave Frequency"); LCD.setCursor(0,1); LCD.print("Press Start"); while ( !(startbutton()) ) ; }
void setup() { portMode(0, INPUT); LCD.clear(); LCD.home(); LCD.setCursor(0,0); LCD.print("Hello World!"); LCD.setCursor(0,1); LCD.print("Press Start"); while ( !(startbutton()) ) ; }
void setup() { portMode(0, OUTPUT); // ***** from 253 template file portMode(1, INPUT); // ***** from 253 template file RCServo0.attach(RCServo0Output); RCServo1.attach(RCServo1Output); RCServo2.attach(RCServo2Output); // DONE EEPROM.write(0, ((int)300.0/5.0)); // leftQRD_thresh EEPROM.write(1, ((int)300.0/5.0)); // rightQRD_thresh EEPROM.write(2, ((int)30.0/5.0)); // proportional_gain EEPROM.write(3, ((int)0.0/5.0)); // derivative_gain EEPROM.write(4, ((int)300.0/5.0)); // leftMotorSpeed_base EEPROM.write(5, ((int)300.0/5.0)); // rightMotorSpeed_base EEPROM.write(6, ((int)700.0/5.0)); // motorFast EEPROM.write(7, ((int)350.0/5.0)); // motorSlow LCD.print("Done"); }