English | 中文
Document Link:https://docs.m5stack.com/#/zh_CN/app/lidarbot
LidarBot is a very powerful and easy-to-use wheeled robot kit that can be applied to map scanning, motion control research, path planning, artificial intelligence, autopilot and multi-machine collaborative tasks.
LidarBot Directory tree
├─Example
│ ├─LidarBot_CarMain_V1.1 - LidarBot master program
│ ├─LidarBot_RemoteController_V1.0 - Remote control handle programV1.0
│ └─LidarBot_RemoteController_V1.2 - Remote control handle programV1.2(Double the accuracy of V1.0)
│
├─Firmware(The bottom MEGA328P firmware can be ignored when used)
│ ├─LidarBot_Bottom_FW - Car floor wheel control board master MEGA328P program (can be ignored)
│ └─LidarBot_Remote_FW - MEGA328P program inside the handle (can be ignored)
│
├─Product_Picture - Product Image
├─Schematic_Diagram - Schematic diagram
└─SComAssistant - Host computer (temporary only radar map display function)
If you have no map on the screen of your remote, reconnect it.
- Press Button B of the lidarBot until the sound raised and the car will get into Broadcast mode with it's mac address on the screen which will send the lidarBot Mac address to the remote.
- And Press Button B for a few second,you will hear the same sound and the Mac address of lidarBot will show on the screen,use
down
button to select and pressselect
when you choose the right Mac address on the screen. - Check out the lidarBot screen whether it receive the message from the remote,press
confirm
and you finish the match.
/* Main loop */
void loop()
{
espnow.BotConnectUpdate();// ESPNOW disconnect reconnect / change device reconnection
lidarcar.MapDisplay();// Show map
esp_now_send(espnow.peer_addr, lidarcar.mapdata, 180);// ESPNOW sends map data
}
-
Single function resolution:
-
Read the use of radar data
#include "lidarcar.h" LidarCar lidarcar; lidarcar.Init(); GetData();//Get the radar saved to the array distance[]
-
Use of the maze
lidarcar.CarMaze(); //Maze execution function
-
Tracking use
lidarcar.TrackControl(); //Tracking execution function
-
Use of ESP_NOW
-
/* Main loop */
void loop()
{
espnow.RemoteConnectUpdate();// ESPNOW disconnect reconnect / change device reconnection
keyboard.GetValue();//Read joystick data
esp_now_send(espnow.peer_addr, keyboard.keyData, 3);// ESPNOW sends joystick data to the car master
MapDisplay();// Show map
accessport.AnalzyCommand();// Send map data to the host computer
}
-
Single function resolution:
-
JOYSTICK
#include "keyboard.h" KeyBoard keyboard; keyboard.Init(); GetValue();//Handle readings are saved in adX, adY, and control assignments to array keyData[] and handle RGB lights
-
Use of communication with the host computer
#include "accessport.h" AccessPort accessport; accessport.AnalzyCommand();// Send map data to PC host computer
-
click the link:https://github.com/m5stack/M5Stack
New plus bit machine debugging features.
Function 1: Display the LidarBot map in real time.
Length: 142mm, width: 117mm, height: 120mm