LowPowerLab Forum

Software support => Pi Gateway => Topic started by: Sstocker on September 27, 2015, 01:44:01 AM

Title: fatal error: avr\sleep.h: No such file or directory [solved]
Post by: Sstocker on September 27, 2015, 01:44:01 AM
I am new to the Motenio hardware.  I am trying to compile the MailNotifier sending node and got the above error.  I assume it is a library file error, and I have tried to find the lib. but without much luck.  Where can I download the lib from??

Thanks in advance
Title: Re: fatal error: avr\sleep.h: No such file or directory
Post by: detroit_johnny on September 27, 2015, 01:55:08 PM
My guess is you are missing the LowPower library in your sketch

Check for this bit of code near the start of your sketch:

#include <LowPower.h>    //get library from: https://github.com/LowPowerLab/LowPower

Title: Re: fatal error: avr\sleep.h: No such file or directory
Post by: Sstocker on September 27, 2015, 10:21:37 PM
No the LowPower lib is there.  I am using Ubuntu 14.04 operating system.  I did the same thing in Win10 and it compiled OK, but I get the error that the com port cannot be found in Win.  So go figure.  Any other ideas??

Here are the first few lines of the code:

#include <RFM12B.h>  This entry is orange:
#include <avr\sleep.h>  This entry is black
#include <avr\delay.h>   This entry is black
#include <LowPower.h>    This entry is orange                         //get it here: https://github.com/LowPowerLab/LowPower

#define NETWORKID         200  //what network this node is on
#define NODEID              2  //this node's ID, should be unique among nodes on this NETWORKID
#define GATEWAYID           1  //central node to report data to
#define KEY "ABCDABCDABCDABCD" //(16 bytes of your choice - keep the same on all encrypted nodes)
#define ACK_TIME     50        // # of ms to wait for an ack
#define SENSORREADPERIOD  SLEEP_250MS  //this will cause transmissions every 2s
#define SENDINTERVAL   5000    //interval for sending readings without ACK

Thanks
Title: Re: fatal error: avr\sleep.h: No such file or directory
Post by: Felix on September 27, 2015, 10:32:01 PM
Hi Sstocker,
What kind of Moteino are you using? What is the radio on it, RFM12B/RFM69?
Are you sure the library is installed correctly? There is a guide here (https://www.arduino.cc/en/Guide/Libraries) to help with installing libs, it may differ with windows/unix.
Title: Re: fatal error: avr\sleep.h: No such file or directory
Post by: Sstocker on September 30, 2015, 04:15:59 PM
I am using a Moteino R5 with RFM69HW.  I went back to Windows and reinstalled the lib, compiled and it is now working.
As far as the com issue in Windows I reinstalled the FTDI drivers and that seemed to fix that problem.  Thanks for this wonderful forum to help newbies get the answers we need.
Title: Re: fatal error: avr\sleep.h: No such file or directory [solved]
Post by: detroit_johnny on October 01, 2015, 10:06:50 PM
Awesome Sstocker!!!  Glad you got the problem solved and also detailed your solution here.  Cheers!!   8)