Ajout de l'algo

This commit is contained in:
2024-01-25 14:29:08 +01:00
parent 2c22e0a538
commit 45cef130ca
15 changed files with 270 additions and 55 deletions

View File

@ -56,4 +56,8 @@ void ServoMotorComponent::refresh() {
}
this->lastUpTime = millis();
this->myservo.write(this->PIN, this->currentPosition);
}
bool ServoMotorComponent::isConnected() {
return true;
}

View File

@ -12,8 +12,9 @@ enum Position {
class ServoMotorComponent
{
public:
ServoMotorComponent(int PIN, unsigned long updatePeriod, float step = 1);
ServoMotorComponent(int PIN, unsigned long updatePeriod = 100, float step = 0.1);
void setDesiredPosition(Position desiredPosition);
bool isConnected();
void refresh();
private: