• Arduino Radar
      Built By :  
      Reviews :  
      Categorie :  
    description - Arduino Radar

    #include #include #define TRIGGER_PIN 2 // Arduino Pin 2 Tied To Trigger Pin On The Ultrasonic Sensor.#define ECHO_PIN 3 // Arduino Pin 3 Tied To Echo Pin On The Ultrasonic Sensor.#define MAX_DISTANCE 150 // Maximum Distance We Want To Ping For (in Centimeters). Maximum Sensor Distance Is Rated At 400-500cm.#define SERVO_PWM_PIN 9 //set Servo To Arduino's Pin 9 // Means -angle .. Angle#define ANGLE_BOUNDS 80#define ANGLE_STEP 1 Int Angle = 0; // Direction Of Servo Movement // -1 = Back, 1 = Forward Int Dir = 1; Servo Myservo;NewPing Sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); Void Setup() { Serial.begin(9600); // Initialize The Serial Port: Myservo.attach(SERVO_PWM_PIN); //set Servo To Arduino's Pin 9} Void Loop() { Delay(50); // We Must Renormalize To Positive Values, Because Angle Is From -ANGLE_BOUNDS .. ANGLE_BOUNDS // And Servo Value Must Be Positive Myservo.write(angle + ANGLE_BOUNDS); // Read Distance From Sensor And Send To Serial GetDistanceAndSend2Serial(angle); // Calculate Angle If (angle >= ANGLE_BOUNDS || Angle <= -ANGLE_BOUNDS) { Dir = -dir; } Angle += (dir * ANGLE_STEP); } Int GetDistanceAndSend2Serial(int Angle) { Int Cm = Sonar.ping_cm(); Serial.print(angle, DEC); Serial.print(","); Serial.println(cm, DEC); }


    Share :
    Can I buy a project file?

    You can purchase project files including design, programming and other files through which you can fully implement the project ... but you will not receive any technical support regarding the project.

    Can I buy the project ready?

    You can buy the project ready as you will receive the project works fully with technical and technical support in case you need to

    Do I have to be knowledgeable about design and programming to deal with projects?

    You do not have to be a professional designer or programmer to deal with the projects at hand. Most of these projects are for educational purposes for students and developers.

    What kind of payments do you accept?

    We accept electronic payment by bank account and by traditional payment at the start of the project

    Is the error tracking module available as part of the free plan?

    An error tracking service is available to ensure the best quality up to the user

    User Rating
    Write a Comment
    You Must be Logged in to Post a Comment.