Topic RSS7:30 pm
August 8, 2016
OfflineHi,
I am trying to create a VI that implements a different sleep function (SLEEP_MODE_IDLE ) than the one available in the toolkit (SLEEP_MODE_PWR_DOWN).
Since there is no input / output, I create from the template lvlib a Shutdown library that looks like this:
with Shutdown_Idle only containing Error in and Out clusters since the shutdown is just a call onto the sleep.h API.
The translator.vi, since not using any I/O, I suppose can be reduced to this:
When creating a basic test.vi and looking into the code generated, it shows the following, which I assumed indicated the translator was ok:
#include "LVArray.h"
#include "A4Lhelper.h"
#include sleep.h
void setup()
{
set_sleep_mode(SLEEP_MODE_IDLE);
sleep_enable();
sleep_mode();
/** The program will continue from here. **/
/* First thing to do is disable sleep. */
sleep_disable();
}void loop()
{
}
Also, the sleep.h file was placed into the [libraries] folder like the the template shows. It was copied from the arduino install folder.
Now when I use my new VI that is supposed to implement the new Sleep function, the compile fails and returns the error below:
1.0.0.21, Arduino/Genuino Uno
Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
temp:13: error: #include expects "FILENAME" or#include sleep.h
^
exit status 1
#include expects "FILENAME" or
Does that mean it does not find the sleep.h after all, or it should use the one from the arduino's install folder??
Thx.
ldbm.

Log In
Register

