From 4c2c5449084ed35b84341c91c08595c0d55ef20d Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Tue, 9 Oct 2012 15:13:42 +0000 Subject: [PATCH] adjusted motor speed --- avr-projects/r3cam-steppermotor/r3cam-steppermotor.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/avr-projects/r3cam-steppermotor/r3cam-steppermotor.c b/avr-projects/r3cam-steppermotor/r3cam-steppermotor.c index 6ed3c33..1bcad56 100644 --- a/avr-projects/r3cam-steppermotor/r3cam-steppermotor.c +++ b/avr-projects/r3cam-steppermotor/r3cam-steppermotor.c @@ -119,6 +119,7 @@ ISR(TIMER0_OVF_vect) void motor_set_speed(uint8_t speed) { m_clk_divisor_ = 0xFF - speed; + CDC_Device_SendString(&VirtualSerial_CDC_Interface, "m_clk_divisor_ = %d\n",m_clk_divisor_); } void motor_run(uint16_t steps, uint8_t direction) @@ -165,10 +166,10 @@ void handle_cmd(uint8_t cmd) case 't': led_toggle(); break; case 'r': reset2bootloader(); break; case 's': motor_stop(); break; - case 'c': motor_run(300,0); break; - case 'w': motor_run(300,1); break; - case 'C': motor_run(1000,0); break; - case 'W': motor_run(1000,1); break; + case 'c': motor_run(50,0); break; + case 'w': motor_run(50,1); break; + case 'C': motor_run(300,0); break; + case 'W': motor_run(300,1); break; case '+': motor_set_speed(++cur_speed); break; case '-': motor_set_speed(--cur_speed); break; default: CDC_Device_SendString(&VirtualSerial_CDC_Interface, "error\n"); return; -- 1.7.10.4