EasyManua.ls Logo

Freenove ESP32 - Page 145

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
Loading...
Need support? support@freenove.com
143
Chapter 15 Dog
www.freenove.com
The following is the code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "Public.h"
DataQueue<String> mqMotion(2); // Motion message queue, When there are too many messages, some
messages can be ignored to reduce latency.
DataQueue<String> mqInfo(100); // Info message queue, Important, can not ignore.
void setup() {
Serial.begin(115200);
Serial.println("\n\nProgram begin ... ");
bleSetup();
prefs.begin(NMSPC_STORAGE);
pca.begin();
pca.releaseAllServo();
getServoOffsetFromStorage();
getLedConfigFromStorage();
cs.begin();
setupAdc();
setupBuzzer();
setupSonar();
setupRGBLED();
setupBuiltInLed();
setupTouchPad();
Serial.println("setup finished!\n\n");
startTask(TASK_MOTION_SERVICE);
startTask(TASK_SECONDRAY); // loop2

Related product manuals