EasyManua.ls Logo

Keyestudio Ks0428 - Test Code2

Keyestudio Ks0428
247 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
97
www.keyestudio.com
180°
There is another guide for restraining servo---- servo library file, the
following link of official website is for your reference.
https://www.arduino.cc/en/Reference/Servo
The library file of servo is used in the following code
(6) Test Code2
/*
keyestudio Mini Tank Robot V2
lesson 4.2
servo
http://www.keyestudio.com
*/
#include <Servo.h>
Servo myservo; // create servo object to control a servo
// twelve servo objects can be created on most boards
int pos = 0; // variable to store the servo position
void setup() {
myservo.attach(9); // attaches the servo on pin 9 to the servo
object
}

Table of Contents

Related product manuals