aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/Scheduler_example03/Scheduler_example03.ino10
-rw-r--r--examples/Scheduler_example05_StatusRequest/Scheduler_example05_StatusRequest.ino4
-rw-r--r--examples/Scheduler_example10_Benchmark/Scheduler_example10_Benchmark.ino1
3 files changed, 8 insertions, 7 deletions
diff --git a/examples/Scheduler_example03/Scheduler_example03.ino b/examples/Scheduler_example03/Scheduler_example03.ino
index 115f7bc..4c371e0 100644
--- a/examples/Scheduler_example03/Scheduler_example03.ino
+++ b/examples/Scheduler_example03/Scheduler_example03.ino
@@ -10,7 +10,9 @@
#define _TASK_SLEEP_ON_IDLE_RUN
#include <TaskScheduler.h>
-#define LEDPIN 13
+#ifndef LED_BUILTIN
+#define LED_BUILTIN 13 // define appropriate pin for your board
+#endif
Scheduler ts;
@@ -54,12 +56,12 @@ void BlinkOnDisable() {
}
void LEDOn () {
- digitalWrite(LEDPIN, HIGH);
+ digitalWrite(LED_BUILTIN , HIGH);
tLED.setCallback( &LEDOff);
}
void LEDOff () {
- digitalWrite(LEDPIN, LOW);
+ digitalWrite(LED_BUILTIN , LOW);
tLED.setCallback( &LEDOn);
}
@@ -69,7 +71,7 @@ void LEDOff () {
void setup() {
// put your setup code here, to run once:
- pinMode(LEDPIN, OUTPUT);
+ pinMode(LED_BUILTIN , OUTPUT);
}
void loop() {
diff --git a/examples/Scheduler_example05_StatusRequest/Scheduler_example05_StatusRequest.ino b/examples/Scheduler_example05_StatusRequest/Scheduler_example05_StatusRequest.ino
index 013c356..6c1e950 100644
--- a/examples/Scheduler_example05_StatusRequest/Scheduler_example05_StatusRequest.ino
+++ b/examples/Scheduler_example05_StatusRequest/Scheduler_example05_StatusRequest.ino
@@ -162,11 +162,11 @@ void setup() {
Serial.begin(115200);
Serial.println("TaskScheduler StatusRequest Sensor Emulation Test. Complex Test.");
- randomSeed(analogRead(A1)+millis());
+ randomSeed(analogRead(A0)+millis());
}
void loop() {
ts.execute();
-} \ No newline at end of file
+}
diff --git a/examples/Scheduler_example10_Benchmark/Scheduler_example10_Benchmark.ino b/examples/Scheduler_example10_Benchmark/Scheduler_example10_Benchmark.ino
index 221b676..05ebd42 100644
--- a/examples/Scheduler_example10_Benchmark/Scheduler_example10_Benchmark.ino
+++ b/examples/Scheduler_example10_Benchmark/Scheduler_example10_Benchmark.ino
@@ -44,7 +44,6 @@ Duration=18423
#define _TASK_STATUS_REQUEST // Compile with support for StatusRequest functionality - triggering tasks on status change events in addition to time only
//#define _TASK_WDT_IDS // Compile with support for wdt control points and task ids
//#define _TASK_LTS_POINTER // Compile with support for local task storage pointer
-#define _TASK_ROLLOVER_FIX // Compensate for millis() rollover once every 47 days
#define _TASK_SLEEP_ON_IDLE_RUN
#include <TaskScheduler.h>