No Sleep is driving me crazy!
-
I folloed the api and have done what I believe to be correct, but obviously isn't as I get a compile warning.
So why does this fail to work at the end of the loop?
int8_t sleep(int 1, int FALLING, unsigned long SLEEP_TIME);See here for api instructions I followed.... https://www.mysensors.org/download/sensor_api_20#sleeping
Thanks for any pointers here.....
-
I folloed the api and have done what I believe to be correct, but obviously isn't as I get a compile warning.
So why does this fail to work at the end of the loop?
int8_t sleep(int 1, int FALLING, unsigned long SLEEP_TIME);See here for api instructions I followed.... https://www.mysensors.org/download/sensor_api_20#sleeping
Thanks for any pointers here.....
-
I am using mysensors 2.1.1 which I believe is the latest one.
But I get a compiler error with arduino IDE 1.8.3 when I add the line exactly as shown above. I have treid various combinations to try and solve the issue, but that's as far as I can get.
It might be a library issue as I had that earlier this week! Here is the error output as it appears after compilation check
C:\Users\captain\Documents\Arduino\MYS-Cinema-0.1\MYS-Cinema-0.1.ino: In function 'void loop()': MYS-Cinema-0.1:130: error: expected ',' or '...' before numeric constant int8_t smartSleep(int 1, int FALLING, unsigned long ms=27000); ^ Multiple libraries were found for "SPI.h" Used: C:\Program Files (x86)\Arduino1.8.3\hardware\arduino\avr\libraries\SPI Not used: C:\Users\captain\Documents\Arduino\libraries\SPI Multiple libraries were found for "Wire.h" Used: C:\Program Files (x86)\Arduino1.8.3\hardware\arduino\avr\libraries\Wire Not used: C:\Users\captain\Documents\Arduino\libraries\Wire exit status 1 expected ',' or '...' before numeric constantThe set up is pro-mini with htu21DF, NRF24L01+, Door sensor.
You might see what the problem is from that!
Thanks for your time.
-
I am using mysensors 2.1.1 which I believe is the latest one.
But I get a compiler error with arduino IDE 1.8.3 when I add the line exactly as shown above. I have treid various combinations to try and solve the issue, but that's as far as I can get.
It might be a library issue as I had that earlier this week! Here is the error output as it appears after compilation check
C:\Users\captain\Documents\Arduino\MYS-Cinema-0.1\MYS-Cinema-0.1.ino: In function 'void loop()': MYS-Cinema-0.1:130: error: expected ',' or '...' before numeric constant int8_t smartSleep(int 1, int FALLING, unsigned long ms=27000); ^ Multiple libraries were found for "SPI.h" Used: C:\Program Files (x86)\Arduino1.8.3\hardware\arduino\avr\libraries\SPI Not used: C:\Users\captain\Documents\Arduino\libraries\SPI Multiple libraries were found for "Wire.h" Used: C:\Program Files (x86)\Arduino1.8.3\hardware\arduino\avr\libraries\Wire Not used: C:\Users\captain\Documents\Arduino\libraries\Wire exit status 1 expected ',' or '...' before numeric constantThe set up is pro-mini with htu21DF, NRF24L01+, Door sensor.
You might see what the problem is from that!
Thanks for your time.
-
I folloed the api and have done what I believe to be correct, but obviously isn't as I get a compile warning.
So why does this fail to work at the end of the loop?
int8_t sleep(int 1, int FALLING, unsigned long SLEEP_TIME);See here for api instructions I followed.... https://www.mysensors.org/download/sensor_api_20#sleeping
Thanks for any pointers here.....
@skywatch are you trying to compile this piece of code:
int8_t sleep(int 1, int FALLING, unsigned long SLEEP_TIME);?
because this is not a valid c code ... -
I am using mysensors 2.1.1 which I believe is the latest one.
But I get a compiler error with arduino IDE 1.8.3 when I add the line exactly as shown above. I have treid various combinations to try and solve the issue, but that's as far as I can get.
It might be a library issue as I had that earlier this week! Here is the error output as it appears after compilation check
C:\Users\captain\Documents\Arduino\MYS-Cinema-0.1\MYS-Cinema-0.1.ino: In function 'void loop()': MYS-Cinema-0.1:130: error: expected ',' or '...' before numeric constant int8_t smartSleep(int 1, int FALLING, unsigned long ms=27000); ^ Multiple libraries were found for "SPI.h" Used: C:\Program Files (x86)\Arduino1.8.3\hardware\arduino\avr\libraries\SPI Not used: C:\Users\captain\Documents\Arduino\libraries\SPI Multiple libraries were found for "Wire.h" Used: C:\Program Files (x86)\Arduino1.8.3\hardware\arduino\avr\libraries\Wire Not used: C:\Users\captain\Documents\Arduino\libraries\Wire exit status 1 expected ',' or '...' before numeric constantThe set up is pro-mini with htu21DF, NRF24L01+, Door sensor.
You might see what the problem is from that!
Thanks for your time.
-
Thanks this does compile OK (the value of examples) - But wiil it work as expected if sleep is broken in 2.1.1?
int8_t smartSleep(1, FALLING, 27000);Also, is this all that is needed for the interrupt to work or do I need to declare it as I would in an arduino sketch?
thanks