ESC stuff
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

testtool.ino 284B

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. }