You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1234567891011121314151617181920 |
- #include <Servo.h>
-
- #define PIN_ESC 5
-
- Servo esc;
-
- void setup() {
- Serial.begin(115200);
- Serial.setTimeout(10);
-
- esc.attach(PIN_ESC);
- }
-
- void loop() {
- String s = Serial.readString();
- if (s == "")
- return;
- esc.writeMicroseconds(s.toInt());
- Serial.println(s.toInt());
- }
|