This section has a few notes about following the guide, and a couple of things that might not be obvious on first reading.
I didn’t see on my first reading of the blog post that there are examples available at the github repository, such as the one for Blink_AnalogRead . Going directly to those examples would probably have saved my a bit of confusion.
Compiling an ‘Empty’ sketch with just the import of
ran with no problems
As did defining parameters
// define two tasks for Blink and AnalogRead
void TaskBlink( void *pvParameters );
void TaskAnalogRead( void *pvParameters );
From the code in the blog post itself, there seemed to be a couple of typos – an extra ; after “Blink” and “Analog Read” in the xTaskCreate function calls.
Updating the loop function
For the loop function with power saving code to work you need to also include
Strictly Necessary Cookies
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
3rd Party Cookies
This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookie enabled helps us to improve our website.
Please enable Strictly Necessary Cookies first so that we can save your preferences!