Pārlūkot izejas kodu

Version 2.0.2 - slight changes to examples for ESP8266 compatibility

Anatoli Arkhipenko 10 gadi atpakaļ
vecāks
revīzija
7dc7c04ac7

+ 6 - 4
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() {

+ 2 - 2
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();
 
-}
+}

+ 0 - 1
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>