Don't ad-block us - support your favorite websites. We have safe, unobstrusive, robotics related ads that you actually want to see - see here for more.
0 Members and 1 Guest are viewing this topic.
void Motor(void);void control(void) { Motor(); //axon_DAQ();//activate the DAQ software (data acquisition) }void Motor(void) { rprintf("Initializing timer4 for PWM\r\n"); //PWM_Init_timer2_H6(10); PWM_Init_timer4_H3(10); rprintf("Turning on both PWM channels\r\n"); //PWM_timer2_On_H6(); PWM_timer4_On_H3(); delay_ms(1000); rprintf("Setting PWM to 1%% duty cycle Warming Motor up\r\n"); //PWM_timer2_Set_H6(0); PWM_timer4_Set_H3(0); delay_ms(6000); rprintf("Setting PWM to 100%% duty cycle Warming Motor up\r\n"); //PWM_timer2_Set_H6(255); PWM_timer4_Set_H3(1023); delay_ms(6000); rprintf("Setting PWM to 1%% duty cycle\r\n"); //PWM_timer2_Set_H6(1); PWM_timer4_Set_H3(1); delay_ms(5000); rprintf("Setting PWM to 12.5%% duty cycle\r\n"); //PWM_timer2_Set_H6(127); PWM_timer4_Set_H3(127); delay_ms(5000); rprintf("Setting PWM to 25%% duty cycle\r\n"); //PWM_timer2_Set_H6(254); PWM_timer4_Set_H3(254); delay_ms(5000); rprintf("Setting PWM to 50%% duty cycle\r\n"); //PWM_timer2_Set_H6(254); PWM_timer4_Set_H3(512); delay_ms(5000); rprintf("Setting PWM to 99%% duty cycle\r\n"); //PWM_timer2_Set_H6(254); PWM_timer4_Set_H3(1023); delay_ms(5000); rprintf("Turning off PWM\r\n"); //PWM_timer2_Off_H6(); PWM_timer4_Off_H3(); delay_ms(1000); }
for(i=0;i<1000;i++){delay_cycles(1000);}
and I was using a power supply.