SHARE
TWEET

Solution to "o: In function `__vector_11': multiple definition (...)"

a guest Apr 13th, 2010 336 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #if 0
  2. SIGNAL(SIG_OUTPUT_COMPARE1A)
  3. {
  4.   #if MOTOR_STYLE == 1
  5.     //do encoder stuff here.
  6.   #else
  7.     //increment our index
  8.     if (motor1_dir == MC_FORWARD)
  9.       stepper_index = (stepper_index - 1) % 8;
  10.     else
  11.       stepper_index = (stepper_index + 1) % 8;
  12.      
  13.     //coil 1
  14.     digitalWrite(MOTOR_1_DIR_PIN,   coil_a_direction & (1 << stepper_index));
  15.     if (coil_a_enabled & (1 << stepper_index))
  16.       analogWrite(MOTOR_1_SPEED_PIN, stepper_high_pwm);
  17.     else
  18.       analogWrite(MOTOR_1_SPEED_PIN, stepper_low_pwm);
  19.  
  20.     //coil 2
  21.     digitalWrite(MOTOR_2_DIR_PIN,   coil_b_direction & (1 << stepper_index));
  22.     if (coil_b_enabled & (1 << stepper_index))
  23.       analogWrite(MOTOR_2_SPEED_PIN, stepper_high_pwm);
  24.     else
  25.       analogWrite(MOTOR_2_SPEED_PIN, stepper_low_pwm);
  26.   #endif
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top