rocketscream / Low-Power

Low Power Library for Arduino
www.rocketscream.com
1.26k stars 345 forks source link

AT32u4 #118

Open Rustie0125 opened 2 years ago

Rustie0125 commented 2 years ago

Hello, I have been attempting to use the library to control the sleep current of the Arduino Micro C board( sparkfun) LEDs, removed , regulator bypassed etc. But Im not having much luck with this library, Couple of notes

I see in the .H file there is mention of usb_t as an on-off option but when you try and use this function in a sketch it returns errors. if I upload default `#include "LowPower.h"

void setup() { // No setup is required for this library }

void loop() { // Enter power down state for 8 s with ADC and BOD module disabled LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);

// Do something here
// Example: Read sensor, data logging, data transmission.

}`

Best result is 1.5mAh which is worse then Arduino lowPower library. Im assuming its due to the extra functions not being switched off like the USB, SPI, etc. Im looking fo rht lowest possible code to be woken up by external interrupt but first just trying to achieve the lowest possible sleep state. Where Can I look in the library on how to incorporate the additional functions as present in the .h file or keywords file