void cmdslow(void) // Moves motors forward at half duty { motor_left_duty(15); motor_right_duty(15); motor_left_forward(); motor_right_forward(); }
void cmdBangBang(void) { motor_init(); motor_left_stop(); motor_right_stop(); motor_left_duty(20); motor_right_duty(40); motor_left_forward(); motor_right_forward(); while(1) { // start turning left motor_left_duty(20); motor_right_duty(40); myStringPut("Bang Left"); myNLPut(); while (line_status() == WHITE) // WHITE { } // Hits Black // Turns right motor_left_duty(40); motor_right_duty(20); myStringPut("Bang Right"); myNLPut(); while (line_status() == BLACK) // BLACK { } } }
void cmdforward(void) // Moves motors forward at full duty { myStringPut("calling cmdforward"); myNLPut(); motor_left_duty(100); motor_right_duty(100); motor_left_forward(); motor_right_forward(); }
void motor_turn_left(){ motor_right_forward(); //servo_disable(PIN_LEFT_SERVO); SetBit(PORTC,PIN_LEFT_FORWARD); SetBit(PORTC,PIN_LEFT_BACKWARD); }
void motor_spin_left(){ motor_right_forward(); motor_left_backward(); }
void motor_forward(){ motor_right_forward(); motor_left_forward(); }