Project 5: Ultrasonic Sensor; Description - Keyestudio Ks0428 Manual

Table of Contents

Advertisement

www.keyestudio.com
Arduino comes with
statement)
The following are some common statements of the servo function:
1. attach ( interface ) — — Set servo interface, port 9 and 10 are
available
3. write(angle)——The statement to set rotation angle of servo,
the angle range is from 0° to 180°
3. read ( ) — — The statement to read angle of servo, read the
command value of"write()"
4. Note: The above written format is"servo variable name, specific
statement()", for instance: myservo.attach(9)

Project 5: Ultrasonic Sensor

(1) Description

range detection with high accuracy and stable readings in an
easy-to-use package. It comes complete with ultrasonic transmitter
#include <Servo.h>
(servo function and
The
HC-SR04
sensor
uses
determine distance to an
object like bats do. It offers
excellent
non-contact
ultrasonic
sonar
to
99

Advertisement

Table of Contents
loading

Table of Contents