I'm working on a sketch that will blink an LED every 4 seconds so I would like to put the Trinket M0 to sleep in between to save battery.
Where I'm having trouble is with the Include avr/sleep.h.....
I'm using 1.8.19 IDE (and tried 2.0) but in all cases, I get "File not found" and if I comment out the include, the variables that are defined in sleep.h are not found.
I've spent all day trying to resolve this and I'm sure it's something stupid I'm missing...
Any help out there ?
Thank you,
Gary Miyakawa
Struggling with Trinket M0 and avr/sleep.h
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- GaryMiyakawa
- Posts: 11
- Joined: Mon Jan 17, 2022 12:39 pm
- mikeysklar
- Posts: 13936
- Joined: Mon Aug 01, 2016 8:10 pm
Re: Struggling with Trinket M0 and avr/sleep.h
The Trinket M0 would need to use a modern SAMD library for sleep. Take a look at SleepyDog.
https://github.com/adafruit/Adafruit_SleepyDog
https://github.com/adafruit/Adafruit_SleepyDog
- GaryMiyakawa
- Posts: 11
- Joined: Mon Jan 17, 2022 12:39 pm
Re: Struggling with Trinket M0 and avr/sleep.h
Thank you for the suggestion. I'll give it a try!
Gary M
Gary M
Please be positive and constructive with your questions and comments.