added startup offset to establish a baseline duty cycle at which the motor starts to spin
This commit is contained in:
1 parent
1334f9c540
commit
cdb68b84da
6 files changed
+251
-196
No files matched your search
@@ -9,17 +9,19 @@
|
||||
#include "string.h"
|
||||
#include "pico/stdlib.h"
|
||||
#include "pico/multicore.h"
|
||||
#include "pico/util/queue.h"
|
||||
#include "hardware/pwm.h"
|
||||
#include "hardware/adc.h"
|
||||
#include "hardware/flash.h"
|
||||
#include "hardware/irq.h"
|
||||
#include "stdint.h"
|
||||
#define ADC_OFFSET 0.025f
|
||||
#define MOTOR_PWM_FORWARD 22
|
||||
#define MOTOR_PWM_REVERSE 23
|
||||
#define FLASH_TARGET_OFFSET (PICO_FLASH_SIZE_BYTES-FLASH_SECTOR_SIZE) //This Offset should be far enough away from program data
|
||||
extern repeating_timer_t pid_control_timer;
|
||||
extern repeating_timer_t speed_helper_timer;
|
||||
extern bool target_direction;
|
||||
extern uint target_speed_step;
|
||||
extern const uint8_t *CV_ARRAY_FLASH;
|
||||
void adjust_pwm_level(uint16_t level);
|
||||
void core1_entry();
|
||||
void core1_entry();
|
||||
float measure(bool direction);
|
||||
Reference in new issue
Block a user