Skip to content

Commit 906584d

Browse files
committed
Revert "Upgrade servo performance"
This reverts commit 14214ac. This commit was provoking DC motors (and everthing using timers) breakage. Need to find a better option to increase servo accurancy
1 parent bef98d5 commit 906584d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

extras/D11-Firmware/D11-Firmware.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void setup() {
5353
Wire.onReceive(receiveEvent);
5454
pinMode(LED_BUILTIN, OUTPUT);
5555
pinMode(IRQ_PIN, OUTPUT);
56-
analogWriteResolution(24);
56+
analogWriteResolution(8);
5757
}
5858

5959
volatile uint8_t command = 0;

src/ServoMotor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ mc::ServoMotor::ServoMotor() {
2525
};
2626

2727
void mc::ServoMotor::setAngle(int angle) {
28-
setData(SET_PWM_DUTY_CYCLE_SERVO, instance, map(angle,0,180,600000,1740000));
28+
setData(SET_PWM_DUTY_CYCLE_SERVO, instance, map(angle,0,180,7,28));
2929
}
3030

3131
void mc::ServoMotor::detach() {

0 commit comments

Comments
 (0)