Skip to content

Commit f37f17b

Browse files
committed
Examples failed to compile because an Arduino problem.
1 parent d291142 commit f37f17b

File tree

11 files changed

+42
-0
lines changed

11 files changed

+42
-0
lines changed

examples/SoftTimer1Task/SoftTimer1Task.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#include <SoftTimer.h>
22

3+
// -- Define method signature.
4+
void callBack1(Task* me);
5+
void callBack2(Task* me);
6+
37
Task t1(2000, callBack1);
48
Task t2(1111, callBack2);
59

examples/SoftTimer2BlinkTask4/SoftTimer2BlinkTask4.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
#define LED_PIN 13
1010

11+
// -- Define method signature.
12+
void onPinEvent();
13+
1114
// -- On for 300ms off for 200ms, repeat it 3 times, than stop.
1215
BlinkTask hartbeat(LED_PIN, 300, 200, 3);
1316

examples/SoftTimer3TonePlayer2/SoftTimer3TonePlayer2.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ BlinkTask hartbeat(LED_PIN, 200, 100, 2, 2000);
1414
// -- Player initialized with 200ms as base time-span.
1515
TonePlayer tonePlayer(BEEPER_PIN, 200);
1616

17+
// -- Define method signature.
18+
void onInfraEvent();
19+
1720
void setup(void)
1821
{
1922
// -- Setup interrupt on pin 3 (which is channel 1).

examples/SoftTimer4SoftPwmTask2/SoftTimer4SoftPwmTask2.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55

66
#define OUT_PIN 13
77

8+
// -- Define method signatures.
9+
void increment(Task* me);
10+
void decrement(Task* me);
11+
812
// -- Set up PWM to the out pin.
913
SoftPwmTask pwm(OUT_PIN);
1014
// -- This task will increment the PWM value. Will be called in every 50 milliseconds.

examples/SoftTimer5DelayRun1/SoftTimer5DelayRun1.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33

44
#define OUT_PIN 13
55

6+
// -- Define method signatures.
7+
boolean turnOff(Task* task);
8+
boolean turnOn(Task* task);
9+
610
// -- This task will turn off the LED after 1 second.
711
DelayRun offTask(1000, turnOff);
812
// -- This task will turn on the LED after 2 seconds.

examples/SoftTimer6Debouncer1/SoftTimer6Debouncer1.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55

66
#define INPUT_PIN 3
77

8+
// -- Define method signatures.
9+
void onPressed();
10+
void onReleased(unsigned long pressTimespan);
11+
812
Debouncer debouncer(INPUT_PIN, MODE_CLOSE_ON_PUSH, onPressed, onReleased);
913

1014

examples/SoftTimer6Debouncer2/SoftTimer6Debouncer2.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212

1313
#define INPUT_PIN 3
1414

15+
// -- Define method signatures.
16+
void onPressed();
17+
void onReleased(unsigned long pressTimespan);
18+
1519
Debouncer debouncer(INPUT_PIN, MODE_CLOSE_ON_PUSH, onPressed, onReleased);
1620

1721

examples/SoftTimer6Rotary/SoftTimer6Rotary.ino

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
#define ROT_PIN_B A5
77
#define ROT_PUSH A3
88

9+
// -- Define method signatures.
10+
void onRotate(short direction, Rotary* rotary);
11+
void onRotPushPress();
12+
void onRotPushRelease(unsigned long pressTime);
13+
914
Rotary r(ROT_PIN_A, ROT_PIN_B, onRotate, true);
1015
Debouncer rotPushDebouncer(ROT_PUSH, MODE_CLOSE_ON_PUSH, onRotPushPress, onRotPushRelease, true);
1116

examples/SoftTimer7Heartbeat/SoftTimer7Heartbeat.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55

66
// -- Creates an starts a visible indicator.
77
Heartbeat heartbeat(LED_PIN);
8+
9+
// -- Define method signature.
10+
void myLoop(Task* me);
11+
812
// -- My task.
913
Task t1(0, myLoop);
1014

examples/SoftTimer8Dimmer/SoftTimer8Dimmer.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
#define ON_OFF_FREQ_MS 1500
1111
#define TRESHOLD_MS 600
1212

13+
// -- Define method signatures.
14+
void onPressed();
15+
void onReleased(unsigned long pressTimespan);
16+
1317
// -- Button for input.
1418
Debouncer debouncer(INPUT_PIN, MODE_CLOSE_ON_PUSH, onPressed, onReleased);
1519
// -- Set up PWM to the out pin.

0 commit comments

Comments
 (0)