ESC stuff
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

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