Compare commits
No commits in common. "4dcfb1ea0751a8a51da23e4d60a340f23cae5d60" and "b21a8fbecfce060fe253ba8530ccf62092d7290d" have entirely different histories.
4dcfb1ea07
...
b21a8fbecf
3 changed files with 4 additions and 10 deletions
|
@ -49,8 +49,6 @@
|
|||
#define SPEED_PIN PB2 // Pin 7/ADC1
|
||||
#define BUTTON_PIN PB4 // Pin 3 - Button input
|
||||
|
||||
#define MOTOR_PULSE 1 //uS motor base pulse
|
||||
|
||||
|
||||
/*The timing of "ticks" is dependent on the AVR timer's counter register
|
||||
* so for an 8bit register the maximum value is 256. Given we stick with
|
||||
|
|
|
@ -3,8 +3,8 @@ add_executable(${PROJECT_NAME}
|
|||
)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
#RegEdit
|
||||
#timer
|
||||
RegEdit
|
||||
timer
|
||||
)
|
||||
|
||||
# Ensure the build rules are defined
|
||||
|
|
|
@ -152,13 +152,9 @@ void MotorMoveTo(uint8_t target) {
|
|||
}
|
||||
|
||||
// The delay ratio controlls the PWM waveforms.
|
||||
for(uint8_t i = 0; i < on_delay; i++){
|
||||
_delay_us(MOTOR_PULSE);
|
||||
}
|
||||
_delay_ms((double)on_delay);
|
||||
MotorCoast();
|
||||
for(uint8_t i = 0; i < off_delay; i++){
|
||||
_delay_us(MOTOR_PULSE);
|
||||
}
|
||||
_delay_ms((double)off_delay);
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue