EasyManuals Logo

Freenove ESP32 User Manual

Default Icon
159 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #124 background imageLoading...
Page #124 background image
Need support? support@freenove.com
122
Chapter 12 Basic Motion
www.freenove.com
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//The whole body goes up and down.
for (int i = 0; i < repeatCounts; i++) {
setBodyHeight(BODY_HEIGHT_MIN);
delay(200);
setBodyHeight(BODY_HEIGHT_MAX);
delay(200);
}
//Move forward (10*10)mm in the positive direction of the x axis
for (int i = 0; i < 10; i++) {
move_any(0, 10, 0);
}
//Move back (10*10)mm in the positive direction of the x axis
for (int i = 0; i < 10; i++) {
move_any(0, -10, 0);
}
//Control the robot dog to sit down and disable all servoes to reduce power consumption
setBodyHeight(BODY_HEIGHT_MIN);
pca.releaseAllServo();
}
void loop() {
delay(10000);
}
Before controlling the robot dog to make various actions, you need to initialize the robot dog first, and get
the calibration data of the servos from NVS If your robot dog has not been calibrated, please navigate back
to Chapter 2 to calibrate the robot dog first.
12
13
14
15
prefs.begin(NMSPC_STORAGE);
pca.begin();
pca.releaseAllServo();
getServoOffsetFromStorage();
The robot dog action speed setting function, with the parameter ranging from 1 to 8. The larger the value,
the faster the robot dog.
void setMoveSpeed(int spd);
The robot dog twisting function. By modifying different parameters, you can make the robot dog perform
various body twisting movements.
void twist_any(int alpha, int beta, int gama);
Robot dog movement function, by modifying the parameters, control the robot dog to go forward at any
direction, any step length, any rotation Angle, and any speed.
* @brief Walk command, any direction, any step length, any spin angle, any speed
*

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Freenove ESP32 and is the answer not in the manual?

Freenove ESP32 Specifications

General IconGeneral
BrandFreenove
ModelESP32
CategoryComputer Hardware
LanguageEnglish

Related product manuals