Setting Arduino Flowcode Sleep Wake functionality

For general Flowcode discussion that does not belong in the other sections.
Post Reply
canary_wharfe
Posts: 78
http://meble-kuchenne.info.pl
Joined: Thu Dec 10, 2020 3:54 pm
Has thanked: 6 times
Been thanked: 11 times

Flowcode v9 Setting Arduino Flowcode Sleep Wake functionality

Post by canary_wharfe »

The attached old Flowcode 5 example is a tutorial Ben wrote way back in time illustrating the code used to put a PIC micro to sleep and wake it up.
I am trying to learn how applicable the syntax of that 'c' statement in the Flowchat is if we want to put an AVR or an Arduino to sleep.

On reviewing online tips on how to put an Arduino to sleep it appears most people use the low power sleep library 'sleep.h'.
The process seems to be, enable the sleep mode, then set the sleep mode (e.g. full sleep) and finally activating sleep with something like
sleep_cpu (); // using a previously defined sleep function.

The wake function follows the usual triggering an interrupt having previously enabled interrupts before going to sleep. The Uno and the Pro Mini have 2 pins (d2 and d3) that have the capability to interrupt what the Arduino is doing.

So my question is can someone give me a Flowcode example with the syntax of the c icons where applicable for 'sleeping' and 'waking' an Arduino with Flowcode? Is it as simple as the encs. example Ben gave us in Flowcode 5 or do we have to cater specifically for the way Flowcode's API works with the Arduino? I have never used the sleep function before on any micro so I'm once again back on the learning curve!

As always many thanks in advance.
Attachments
Flowcode 5 Sleep C_code_example_22_10_2008.zip
(2.56 KiB) Downloaded 107 times

Post Reply