Changeset 3716c66 in robotics


Ignore:
Timestamp:
06/17/14 20:38:36 (7 years ago)
Author:
Steve Castellotti <sc@…>
Branches:
master
Parents:
4c79bbb
Message:
  • final code for Discovery shoot
File:
1 edited

Legend:

Unmodified
Added
Removed
  • car/firmware/car/car.ino

    r4c79bbb r3716c66  
    3636#define SERVO_PIN_TURN 9 
    3737 
    38 #define POSITION_BRAKE_STOP 60 
     38#define POSITION_BRAKE_STOP 45 
    3939#define POSITION_BRAKE_GO 150 
    4040 
     
    4646#define POSITION_TURN_GO 170 
    4747 
    48 #define TIME_DRIVE_FORWARD 10000 // Drive forward for two seconds per detection 
    49 #define TIME_TURN 3000 // Turn wheel for one second per detection 
     48#define TIME_DRIVE_FORWARD 4000 // Drive forward for two seconds per detection 
     49#define TIME_TURN 4000 // Turn wheel for one second per detection 
    5050#define TIME_TURN_DRIVE 4000 // Drive forward to two seconds while turning 
    5151 
     
    239239  servoBrake.write(POSITION_BRAKE_STOP); 
    240240   
     241 
     242//  // Turn wheel 
     243//  servoTurn.write(POSITION_TURN_GO); 
     244//   
     245//  // Release brake 
     246//  servoBrake.write(POSITION_BRAKE_GO); 
     247//   
     248//  delay(TIME_TURN_DRIVE - TIME_TURN); 
     249//  servoTurn.write(POSITION_TURN_STOP); 
     250//   
     251//   
     252//  // Drive while turning 
     253//  delay(TIME_TURN_DRIVE - (TIME_TURN_DRIVE - TIME_TURN)); 
     254//   
     255//  // Apply brake 
     256//  servoBrake.write(POSITION_BRAKE_STOP); 
     257 
     258   
     259   
    241260  // Reset wheel 
    242261//  servoDirection.write(POSITION_DIRECTION_RIGHT); 
     
    274293  // Apply brake 
    275294  servoBrake.write(POSITION_BRAKE_STOP); 
    276    
     295 
     296 
     297//  // Turn wheel 
     298//  servoTurn.write(POSITION_TURN_GO); 
     299//   
     300//  // Release brake 
     301//  servoBrake.write(POSITION_BRAKE_GO); 
     302//   
     303//  delay(TIME_TURN_DRIVE - TIME_TURN); 
     304//  servoTurn.write(POSITION_TURN_STOP); 
     305//   
     306//   
     307//  // Drive while turning 
     308//  delay(TIME_TURN_DRIVE - (TIME_TURN_DRIVE - TIME_TURN)); 
     309 
     310 
     311 
    277312  // Reset wheel 
    278313//  servoDirection.write(POSITION_DIRECTION_LEFT); 
Note: See TracChangeset for help on using the changeset viewer.