Skip to content

Commit 3f44674

Browse files
committed
Update ServoMotor.ino
1 parent 5401cb1 commit 3f44674

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libraries/PWM/examples/ServoMotor/ServoMotor.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
#include "ServoESP32S2.h"
88

9-
#define servoPin D8
9+
#define servoPin D8 // SD pini
1010
Servo_ESP32S2 servo ={-1, servoPin};
1111
int position = 0;
1212

@@ -17,11 +17,11 @@ void setup(){
1717
}
1818

1919
void loop(){
20-
for (position = 0; position <= 180; position += 5){
20+
for (position = 0; position <= 180; position += 30){
2121
ServoESP32S2.setPosition(servo.servoIndex, position);
2222
delay(50);
2323
}
24-
for (position = 180; position >= 0; position -= 5){
24+
for (position = 180; position >= 0; position -= 30){
2525
ServoESP32S2.setPosition(servo.servoIndex, position);
2626
delay(50);
2727
}

0 commit comments

Comments
 (0)