EasyManua.ls 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
*
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
Clock Speed240 MHz
RAM520 KB SRAM
Wi-Fi802.11 b/g/n
UART3
Operating Voltage3.3V
Input Voltage5V
DC Current per I/O Pin40mA
USBMicro USB
MicrocontrollerESP32
ChipESP32
BluetoothBluetooth v4.2 BR/EDR and BLE standard
ADC Channels/Analog Input Pins18
I2CYes
SPIYes
InterfacesI2C, SPI, UART
CPUDual-Core 32-bit LX6 Microprocessor

Summary

Safety and Precautions

General Safety Guidelines

Outlines crucial safety measures for handling and using the robot kit to prevent injury or damage.

Hardware Components

ESP32 Expansion Board and Modules

Details the ESP32 expansion board, ESP32 module, camera, and other electronic components.

Mechanical Parts and Tools

Lists acrylic parts, servos, screws, nuts, standoffs, and necessary tools for assembly.

Software and Firmware Setup

CH340 Driver and Firmware Installation

Guides on installing the CH340 driver and burning firmware for OS.

Freenove App and Arduino IDE Setup

Covers installing the Freenove app and setting up the Arduino IDE environment.

ESP32 Pin Configuration

Details ESP32 pins, their functions, and descriptions for robot connectivity.

Robot Assembly and Calibration

Step-by-Step Assembly Guide

Details the process of assembling the robot's body, legs, head, and wiring.

Servo Wiring and Calibration

Guides on connecting ESP32, batteries, servos, and performing robot calibration.

Robot Functionality and Control

Freenove App Features

Overviews app features like Wi-Fi config, LED control, and interaction.

Ultrasonic Ranging and Motion Control

Explains ultrasonic sensor and provides code for robot movements.

Communication Protocols and Commands

Explains communication commands via Serial, BLE, Wi-Fi, and development aspects.

Related product manuals