This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <Servo.h> | |
| static const uint8_t SERVO_PIN = 9; | |
| static const uint8_t TRIG_PIN = 10; | |
| static const uint8_t ECHO_PIN = 11; | |
| Servo s; | |
| long readDistanceCm() { | |
| // Trigger pulse |
OlderNewer