CRINSA-team2025
V1
Documentation du Club Robot INSA Rennes 2025
Chargement...
Recherche...
Aucune correspondance
ServosPCA9685.h
1
//
2
// Created by boris on 02/04/2025.
3
//
4
5
#ifndef SERVOSPCA9685_H
6
#define SERVOSPCA9685_H
7
8
#include <Wire.h>
9
#include <SPI.h>
//Don't delete
10
#include <Adafruit_PWMServoDriver.h>
11
12
#define SERVOMIN 150
// This is the 'minimum' pulse length count (out of 4096)
13
#define SERVOMAX 600
// This is the 'maximum' pulse length count (out of 4096)
14
#define USMIN 600
// This is the rounded 'minimum' microsecond length based on the minimum pulse of 150
15
#define USMAX 2400
// This is the rounded 'maximum' microsecond length based on the maximum pulse of 600
16
#define SERVO_FREQ 50
// Analog servos run at ~50 Hz updates
17
#define PCA9685_I2C_ADDRESS 0x40
18
19
#define PCA9685_SDA_PIN PB7
20
#define PCA9685_SCL_PIN PB6
21
22
namespace
ServosPCA9685 {
23
void
Init();
24
void
Write(uint8_t servo, uint16_t value);
25
};
26
27
28
29
#endif
//SERVOSPCA9685_H
lib
ServosPCA9685
ServosPCA9685.h
Généré par
1.13.2