Commit 61da345e authored by Alex Wang Fu's avatar Alex Wang Fu
Browse files

pwwm wworks. just wasnt using large enough duty cycle

parent b96a7ed5
...@@ -52,6 +52,7 @@ void set_pwm(bool left, bool up, float fduty) { ...@@ -52,6 +52,7 @@ void set_pwm(bool left, bool up, float fduty) {
MOTOR_PWM_FREQUENCY, false); MOTOR_PWM_FREQUENCY, false);
common_hal_pwmio_pwmout_construct(&right_backward_wing, right_backward_pin, common_hal_pwmio_pwmout_construct(&right_backward_wing, right_backward_pin,
0, MOTOR_PWM_FREQUENCY, false); 0, MOTOR_PWM_FREQUENCY, false);
initted = true;
} }
// Convert from the float to a fraction of 65536 // Convert from the float to a fraction of 65536
......
...@@ -189,19 +189,19 @@ void shared_module_ee285_test(void) ...@@ -189,19 +189,19 @@ void shared_module_ee285_test(void)
for(int i = 0; i < 2; i++) { for(int i = 0; i < 2; i++) {
//! Issue: none of the upward movements work! //! Issue: none of the upward movements work!
set_pwm(LEFT, UP, .25); set_pwm(LEFT, UP, MAX_DUTY);
common_hal_time_delay_ms(1000); common_hal_time_delay_ms(1000);
set_pwm(LEFT, UP, 0.0); set_pwm(LEFT, UP, 0.0);
set_pwm(LEFT, DOWN, .25); set_pwm(LEFT, DOWN, MAX_DUTY);
common_hal_time_delay_ms(1000); common_hal_time_delay_ms(1000);
set_pwm(LEFT, DOWN, 0.0); set_pwm(LEFT, DOWN, 0.0);
set_pwm(RIGHT, UP, .25); set_pwm(RIGHT, UP, MAX_DUTY);
common_hal_time_delay_ms(1000); common_hal_time_delay_ms(1000);
set_pwm(RIGHT, UP, 0.0); set_pwm(RIGHT, UP, 0.0);
set_pwm(RIGHT, DOWN, .25); set_pwm(RIGHT, DOWN, MAX_DUTY);
common_hal_time_delay_ms(1000); common_hal_time_delay_ms(1000);
set_pwm(RIGHT, DOWN, 0.0); set_pwm(RIGHT, DOWN, 0.0);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment