feature/servo_motor_component #17

Merged
Mathis merged 13 commits from feature/servo_motor_component into develop 2024-01-19 15:46:01 +00:00
3 changed files with 5 additions and 5 deletions
Showing only changes of commit 844cbf817c - Show all commits

View File

@ -4,21 +4,21 @@ ServoMotorComponent::ServoMotorComponent(int PIN) {
this->PIN = PIN;
this->position = 0;
this->myservo.attach(PIN);
this->myservo.write(0);
}
void ServoMotorComponent::goLeft() {
this->myservo.write(0);
this->myservo.write(this->PIN, 0);
this->position = 0;
}
void ServoMotorComponent::goRight() {
this->myservo.write(180);
this->myservo.write(this->PIN, 180);

???

???
this->position = 180;
}
void ServoMotorComponent::goMiddle() {

Nom des variables pas claire

Nom des variables pas claire
this->myservo.write(90);
this->myservo.write(this->PIN, 90);
this->position = 90;
}

View File

@ -54,7 +54,7 @@ lib_deps =
bblanchon/ArduinoJson@^6.21.3 ; JSON serializer et deserializer
m5stack/M5Stack@^0.4.5 ; M5 Lib
m5stack/M5GFX@^0.1.9 ; M5 Lib pour le LCD
arduino-libraries/Servo@^1.2.1 ; Lib pour le Servo Motor
dlloydev/ESP32 ESP32S2 AnalogWrite
; example:
; erropix/ESP32 AnalogWrite@0.2