Arduino: 1.8.13 (Windows 10), Board: "Moteino M0, External 32.768Khz, TinyUSB, Off"
In file included from C:\XXXX\XXXX\XXXX\Arduino\libraries\RFM69_LowPowerLab\Examples\DeepSleep\DeepSleep.ino:8:0:
C:\XXXX\XXXX\XXXX\Arduino\libraries\LowPower_LowPowerLab/LowPower.h:161:6: error: #error "Please ensure chosen MCU is a SAMD21"
#error "Please ensure chosen MCU is a SAMD21"
^~~~~
exit status 1
Error compiling for board Moteino M0.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
In file included from C:\XXXX\XXXX\XXXX\Arduino\libraries\RFM69_LowPowerLab\Examples\DeepSleep\DeepSleep.ino:8:0:
C:\XXXX\XXXX\XXXX\Arduino\libraries\LowPower_LowPowerLab/LowPower.h:161:6: error: #error "Please ensure chosen MCU is a SAMD21"
#error "Please ensure chosen MCU is a SAMD21"
^~~~~
121 #if defined (__AVR__)
... Stuff to do with AVR ...
156 #elif defined (__arm__)
157 #if defined(__SAMD21__)
158 void idle(idle_t idleMode);
159 void standby();
160 #else
161 #error "Please ensure chosen MCU is a SAMD21"
162 #endif
163
164 #else
165
166 #error "Processor architecture is not supported."
167
168 #endif
#ifndef __SAMD21__
#define __SAMD21__
#endif
C:\XXXX\XXXX\XXXX\XXXX\XXXX\arduino_modified_sketch_898042\DeepSleep.ino: In function 'void longSleep(uint32_t)':
DeepSleep:75:16: error: 'class LowPowerClass' has no member named 'powerDown'
LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
#if defined (__AVR__)
// Some lines removed for clairity
void adcNoiseReduction(period_t period, adc_t adc, timer2_t timer2) __attribute__((optimize("-O1")));
void powerDown(period_t period, adc_t adc, bod_t bod) __attribute__((optimize("-O1")));
void powerSave(period_t period, adc_t adc, bod_t bod, timer2_t timer2) __attribute__((optimize("-O1")));
void powerStandby(period_t period, adc_t adc, bod_t bod) __attribute__((optimize("-O1")));
void powerExtStandby(period_t period, adc_t adc, bod_t bod, timer2_t timer2) __attribute__((optimize("-O1")));
void longPowerDown(uint32_t sleepTime);
#elif defined (__arm__)
#if defined(__SAMD21__)
void idle(idle_t idleMode);
void standby();
#else
#error "Please ensure chosen MCU is a SAMD21"
#endif
#else
#error "Processor architecture is not supported."
#endif
// **** INCLUDES *****
#include "LowPower.h"
void setup()
{
delay(1000);
// No setup is required for this library
}
void loop()
{
// Enter idle state for 8 s with the rest of peripherals turned off
// Each microcontroller comes with different number of peripherals
// Comment off line of code where necessary
#if defined (__AVR_ATmega328P__) || defined (__AVR_ATmega168__)
LowPower.idle(SLEEP_8S, ADC_OFF, TIMER2_OFF, TIMER1_OFF, TIMER0_OFF,
SPI_OFF, USART0_OFF, TWI_OFF);
#elif defined __AVR_ATmega644P__ || defined (__AVR_ATmega1284P__)
LowPower.idle(SLEEP_8S, ADC_OFF, TIMER2_OFF,
TIMER1_OFF, TIMER0_OFF, SPI_OFF,
USART1_OFF, USART0_OFF, TWI_OFF);
#endif
// ATmega32U4
//LowPower.idle(SLEEP_8S, ADC_OFF, TIMER4_OFF, TIMER3_OFF, TIMER1_OFF,
// TIMER0_OFF, SPI_OFF, USART1_OFF, TWI_OFF, USB_OFF);
// ATmega2560
//LowPower.idle(SLEEP_8S, ADC_OFF, TIMER5_OFF, TIMER4_OFF, TIMER3_OFF,
// TIMER2_OFF, TIMER1_OFF, TIMER0_OFF, SPI_OFF, USART3_OFF,
// USART2_OFF, USART1_OFF, USART0_OFF, TWI_OFF);
// ATmega256RFR2
//LowPower.idle(SLEEP_8S, ADC_OFF, TIMER5_OFF, TIMER4_OFF, TIMER3_OFF,
// TIMER2_OFF, TIMER1_OFF, TIMER0_OFF, SPI_OFF,
// USART1_OFF, USART0_OFF, TWI_OFF);
// Do something here
// Example: Read sensor, data logging, data transmission.
}