[WheelWatcher] WW-01 Code



Pete,
 
My CCS compiler version is 4.068

#define DEBUG_SNS 1
#define DEBUG_STAT 1
#define RC_SERVO_MODE 1
#ifdef RC_SERVO_MODE
#define ZERO_SERVOS 1
#endif
//#define MARKIII_SENSOR_BOARD_HBRIDGE_MODE 1
#define LEFT_CLK_ON_TIMER_1 1
//#define NESTED_LOOPS 1
#define ENCODER_TEST 1  // use this to verify that your encoders are working
#define MOTOR_TEST 1    // use this to verify that your motors or servos are
wired right, and spin the right way
#define SPEED_TEST 1    // use this to test velocity control
#define POSITION_TEST 1 // use this to test position control
#ifdef ENCODER_TEST
#ifndef DEBUG_SNS
#define DEBUG_SNS 1  // this must be on for encoder test
#endif
#endif
 
I did modify the first couple lines of void setup() to get motor directions
correct. As shown below.
   
 lw = &lwheel;
  // lwheel.high_fwd_dir = FALSE;                             
  lwheel.pos_fwd_pw = TRUE;
  
 rw = &rwheel;
   rwheel.pos_fwd_pw = FALSE;      
// rwheel.high_fwd_dir = TRUE;                              
 
The lines that are commented out were added so I could get the directions
correctly.  If I leave them commented out I still have same problem.
 
 
This is all I have changed.  My main goal is to get this working of a 18F4520
since it has more memory and internal oscillator so I am just trying to make
sure it working before that.  Thanks again

 
 




This archive was generated by a fusion of Pipermail (Mailman edition) and MHonArc.