-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathesp32_task_demo.ino
44 lines (38 loc) · 1.51 KB
/
esp32_task_demo.ino
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//Youtube tutorial : https://youtu.be/382p1NT1Wcs
#include "screen_sketch.h" // Screen Sketch
#include "button_sketch.h" // Button Sketch
#include "neopixels_sketch.h" // Neopixels Sketch
void setup()
{
Serial.begin(115200);
xTaskCreatePinnedToCore(
screenSketch, // Task function
"taskName", // Task name
8192, // Stack size
NULL, // Task input parameters
1, // Task priority, be carefull when changing this
NULL, // Task handle, add one if you want control over the task (resume or suspend the task)
1 // Core to run the task on
);
xTaskCreatePinnedToCore(
buttonSketch, // Task function
"taskName", // Task name
8192, // Stack size
NULL, // Task input parameters
1, // Task priority, be carefull when changing this
NULL, // Task handle, add one if you want control over the task (resume or suspend the task)
1 // Core to run the task on
);
xTaskCreatePinnedToCore(
neopixelsSketch, // Task function
"taskName", // Task name
8192, // Stack size
NULL, // Task input parameters
1, // Task priority, be carefull when changing this
NULL, // Task handle, add one if you want control over the task (resume or suspend the task)
1 // Core to run the task on
);
}
void loop()
{
}