1234567891011121314151617181920212223242526 |
- #include <Servo.h>
-
- #define PIN_ESC 3
- #define MIN_SPEED 1000
- #define MAX_SPEED 2000
- #define ZERO_SPEED 1500
-
- Servo esc;
-
- void setup() {
- Serial.begin(115200);
-
- Serial.println("Hello");
- delay(10000);
- Serial.println("Writing ZERO_SPEED");
- esc.attach(PIN_ESC);
- esc.writeMicroseconds(0);
- esc.writeMicroseconds(ZERO_SPEED);
- delay(10000);
- Serial.println("Writing MAX_SPEED");
- esc.writeMicroseconds(MAX_SPEED);
-
- }
-
- void loop() {
- }
|