Skip to content

Commit 7199cc0

Browse files
Update Servo.h
1 parent 430c27f commit 7199cc0

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/Servo.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,15 @@
8282
#define MIN_PULSE_WIDTH 544 // the shortest pulse sent to a servo
8383
#define MAX_PULSE_WIDTH 2400 // the longest pulse sent to a servo
8484
#define DEFAULT_PULSE_WIDTH 1500 // default pulse width when servo is attached
85+
86+
// default frequency - servos within kits
87+
// 20000µs/1000000µs = 0.02s
88+
// 1/0.02s = 50Hz
89+
90+
// higher end servos - remote control servos --- typical 333Hz
91+
// 1/333Hz = 0.003003s * 1000000µs = 3003µs for a refesh rate
8592
#define REFRESH_INTERVAL 20000 // minimum time to refresh servos in microseconds
86-
//20000µs/1000000µs = 0.02s
87-
//1/0.02s = 50Hz
88-
//1/333Hz = 0.003003s * 1000000µs = 3003µs for a refesh rate
93+
8994

9095
#define SERVOS_PER_TIMER 12 // the maximum number of servos controlled by one timer
9196
#define MAX_SERVOS (_Nbr_16timers * SERVOS_PER_TIMER)

0 commit comments

Comments
 (0)