ESC stuff
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1234567891011121314151617181920
  1. #include <Servo.h>
  2. #define PIN_ESC 5
  3. Servo esc;
  4. void setup() {
  5. Serial.begin(115200);
  6. Serial.setTimeout(10);
  7. esc.attach(PIN_ESC);
  8. }
  9. void loop() {
  10. String s = Serial.readString();
  11. if (s == "")
  12. return;
  13. esc.writeMicroseconds(s.toInt());
  14. Serial.println(s.toInt());
  15. }