You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-1
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,19 @@
2
2
3
3
Arduino Nonpreemptive multitasking library
4
4
5
-
Clone this into your Arduino\Library folder.
5
+
For the latest Arduino IDE, use the library manager to find and install "Task by Makuna" library.
6
+
7
+
For older versions, you can just clone this into your Arduino\Library folder.
6
8
7
9
For a good starting point at understanding the direction of this library, please read https://learn.adafruit.com/multi-tasking-the-arduino-part-1?view=all.
8
10
This library was not based on that work though, but they share common goals.
9
11
10
12
NOTE: Avoid the use of Delay in all high level code as the tasks timing should be used to replace it.
11
13
12
14
## Installing This Library
15
+
Open the Library Manager and search for "Task by Makuna" and install
16
+
17
+
## Installing This Library From GitHub
13
18
Create a directory in your Arduino\Library folder named "Task"
14
19
Clone (Git) this project into that folder.
15
20
It should now show up in the import list.
@@ -120,6 +125,11 @@ It will instance two custom ButtonTasks to monitor two different pins and they w
120
125
121
126
This requires two momentary buttons attached between pins 4 & 5 and ground, you can change the pins to any digital pin
122
127
128
+
### RotaryEncoder
129
+
This demonstrates creating a task to manage the details of rotary encoder. The task will track a value and increment and decrement it when the encoder is rotated. It will also provide a callback so the application can respond. Further, it provides a debounced button callback for the encoder press feature.
130
+
131
+
This requires a common rotary encoder be connected to available pins.
132
+
123
133
## Sleep Modes (advanced feature)
124
134
If you want to have your project to deep sleep and use less power, you can call the EnterSleep method and pass in a sleep modes as defined in Arduino header sleep.h. The default is SLEEP_MODE_PWR_DOWN if you dont provide one.
125
135
The processor will be placed into the given sleep mode until it is woke up. Different sleep modes have different actions that can cause it to wake. But external interrupts will wake up the Arduino for all sleep modes.
sentence=A library that makes creating complex mulitple task projects easy.
6
-
paragraph=This implements a Nonpreemptive multitasking library which is effecient in speed and memory, which is good for small Arduino hardware. While multitasking is an advanced topic, our friends at AdaFruit have a great article on it here (https://learn.adafruit.com/multi-tasking-the-arduino-part-1?view=all), Samples include blinking an LED without using delay(), monitoring and reacting to a button press, and cross task messaging. Tested on esp8266.
6
+
paragraph=This implements a Nonpreemptive multitasking library which is effecient in speed and memory, which is good for small Arduino hardware. While multitasking is an advanced topic, our friends at AdaFruit have a great article on it here (https://learn.adafruit.com/multi-tasking-the-arduino-part-1?view=all), Samples include blinking an LED without using delay(), monitoring and reacting to a button press, cross task messaging, and rotary encoder. Tested on AVR and esp8266.
0 commit comments