【Arduino】利用超声波模仿雷达扫描效果
#include <Servo.h>const int trigPin = 10;const int echoPin = 11;long duration;int distance;Servo myServo; // Creates a servo object for controlling the servo motorvoid setup() { pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); Seri