Files
hexapod-robot/2026-current/robot/ServoDriver.h
T

12 lines
453 B
C++
Raw Normal View History

#pragma once
#include "Kinematics.h"
class ServoDriver {
public:
void begin(); // set up the PWM pins (no pulses yet)
void relaxAll(); // stop all pulses - call when disarming
void writeLeg(int leg_index, const JointAngles& angles);
// Joint angle -> pulse through that servo's calibration (Config.h SERVOS).
static int degToMicros(int leg, int joint, float deg);
};