ESC stuff
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

simplecontroller.ino 445B

1234567891011121314151617181920212223242526
  1. #include <Servo.h>
  2. #define PIN_ESC 3
  3. #define MIN_SPEED 1000
  4. #define MAX_SPEED 2000
  5. #define ZERO_SPEED 1500
  6. Servo esc;
  7. void setup() {
  8. Serial.begin(115200);
  9. Serial.println("Hello");
  10. delay(10000);
  11. Serial.println("Writing ZERO_SPEED");
  12. esc.attach(PIN_ESC);
  13. esc.writeMicroseconds(0);
  14. esc.writeMicroseconds(ZERO_SPEED);
  15. delay(10000);
  16. Serial.println("Writing MAX_SPEED");
  17. esc.writeMicroseconds(MAX_SPEED);
  18. }
  19. void loop() {
  20. }