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