[feature/ServoMotor] - change servo librarie
This commit is contained in:
parent
f3dc069f3b
commit
027015b33b
@ -4,21 +4,21 @@ ServoMotorComponent::ServoMotorComponent(int PIN) {
|
|||||||
this->PIN = PIN;
|
this->PIN = PIN;
|
||||||
this->position = 0;
|
this->position = 0;
|
||||||
this->myservo.attach(PIN);
|
this->myservo.attach(PIN);
|
||||||
this->myservo.write(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServoMotorComponent::goLeft() {
|
void ServoMotorComponent::goLeft() {
|
||||||
this->myservo.write(0);
|
this->myservo.write(this->PIN, 0);
|
||||||
this->position = 0;
|
this->position = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServoMotorComponent::goRight() {
|
void ServoMotorComponent::goRight() {
|
||||||
this->myservo.write(180);
|
this->myservo.write(this->PIN, 180);
|
||||||
|
|
||||||
this->position = 180;
|
this->position = 180;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServoMotorComponent::goMiddle() {
|
void ServoMotorComponent::goMiddle() {
|
||||||
this->myservo.write(90);
|
this->myservo.write(this->PIN, 90);
|
||||||
this->position = 90;
|
this->position = 90;
|
||||||
}
|
}
|
||||||
|
|
@ -55,7 +55,7 @@ lib_deps =
|
|||||||
m5stack/M5Stack@^0.4.5 ; M5 Lib
|
m5stack/M5Stack@^0.4.5 ; M5 Lib
|
||||||
m5stack/M5GFX@^0.1.9 ; M5 Lib pour le LCD
|
m5stack/M5GFX@^0.1.9 ; M5 Lib pour le LCD
|
||||||
m5stack/Module_GRBL_13.2@^0.0.3 ; M5 Lib pour Stepper (GRBL)
|
m5stack/Module_GRBL_13.2@^0.0.3 ; M5 Lib pour Stepper (GRBL)
|
||||||
arduino-libraries/Servo@^1.2.1 ; Lib pour le Servo Motor
|
dlloydev/ESP32 ESP32S2 AnalogWrite ; Lib pour le Servo Motor
|
||||||
; example:
|
; example:
|
||||||
; erropix/ESP32 AnalogWrite@0.2
|
; erropix/ESP32 AnalogWrite@0.2
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user