-
Notifications
You must be signed in to change notification settings - Fork 34
/
heap_test.ino
138 lines (117 loc) · 2.39 KB
/
heap_test.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
45
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#include <Arduino.h>
#include <Scheduler.h>
#include <Task.h>
#include <LeanTask.h>
#define TASK_TYPE Task
//#define TASK_TYPE LeanTask
class Blank1Task : public TASK_TYPE {
protected:
void loop() {
Serial.println("Blank 1");
delay(1010);
}
} blank1_task;
class Blank2Task : public TASK_TYPE {
protected:
void loop() {
Serial.println("Blank 2");
delay(1020);
}
} blank2_task;
class Blank3Task : public TASK_TYPE {
protected:
void loop() {
Serial.println("Blank 3");
delay(1030);
}
} blank3_task;
class Blank4Task : public TASK_TYPE {
protected:
void loop() {
Serial.println("Blank 4");
delay(1040);
}
} blank4_task;
class Blank5Task : public TASK_TYPE {
protected:
void loop() {
Serial.println("Blank 5");
delay(1050);
}
} blank5_task;
class Blank6Task : public TASK_TYPE {
protected:
void loop() {
Serial.println("Blank 6");
delay(1060);
}
} blank6_task;
class Blank7Task : public TASK_TYPE {
protected:
void loop() {
Serial.println("Blank 7");
delay(1070);
}
} blank7_task;
class Blank8Task : public TASK_TYPE {
protected:
void loop() {
Serial.println("Blank 8");
delay(1080);
}
} blank8_task;
class Blank9Task : public TASK_TYPE {
protected:
void loop() {
Serial.println("Blank 9");
delay(1090);
}
} blank9_task;
class Blank10Task : public TASK_TYPE {
protected:
void loop() {
Serial.println("Blank 10");
delay(1100);
}
} blank10_task;
class Blank11Task : public TASK_TYPE {
protected:
void loop() {
Serial.println("Blank 11");
delay(1110);
}
} blank11_task;
class Blank12Task : public TASK_TYPE {
protected:
void loop() {
Serial.println("Blank 12");
delay(1120);
}
} blank12_task;
void setup() {
Serial.begin(115200);
Serial.println("");
delay(1000);
Scheduler.start(&blank1_task);
Scheduler.start(&blank2_task);
Scheduler.start(&blank3_task);
Scheduler.start(&blank4_task);
Scheduler.start(&blank5_task);
Scheduler.start(&blank6_task);
Scheduler.start(&blank7_task);
Scheduler.start(&blank8_task);
Scheduler.start(&blank9_task);
Scheduler.start(&blank10_task);
Scheduler.start(&blank11_task);
Scheduler.start(&blank12_task);
Scheduler.begin();
}
void loop() {
static unsigned long ts = 0;
if (millis() - ts > 10000) {
Serial.print("Free Heap: ");
Serial.print(ESP.getFreeHeap());
Serial.println(" bytes");
ts = millis();
}
}