Is LowPowerLab Low-Power Library only for Moteinos?

Started by arf, June 07, 2021, 10:09:17 PM

arf

Is the LowPowerLab Low-Power library only compatible with Moteinos? 

I tried to compile a simple example on an Adafruit M0 but it is giving a compilation error saying that the chosen MCU is not a SAMD21. 

Jason

Per the README file:

QuoteLightweight low power library for AVR/SAMD21 Moteino boards.
By Felix Rusu, LowPowerLab.com
Forked from Low-Power.

Date: 08-08-2018

Devices Supported:

ATMega168
ATMega328P
ATMega32U4
ATMega644P
ATMega1284P
ATMega2560
ATMega256RFR2
ATSAMD21

Therefore it should "work" with a feather since it uses an ATSAMD21 but will need tweaking since I doubt the pin out on the feather matches the Moteino M0. If you pretend it is a MoteinoM0 and select that in the arduino IDE (see link below on how). I think it should "work" but not all the pins may match up.

https://lowpowerlab.com/guide/moteino/moteinom0/

This is all a hypothesis as I have not used either the moteino M0 nor the adafruit feather. I have used some knock off Arduinos as Moteinos and that has worked out though when the pinouts were different it added a level of complexity. For faster and easier prototyping I found it worth it to start out with the Moteino and branch if I wanted to later.

Felix

Should work as long as it's a SAMD21, but it depends how adafruit defines their MCUs in the board definitions. You may want to choose a MoteinoM0 as target instead, though the pins may differ indeed.

arf

I couldn't get any of the examples in that library to compile when I plugged in a moteino m0 and of course chose that as the board type

Jason


Felix

Looks like the newer versions of the SAMD cores no longer define __SAMD21__.
I patched the library to look for ARDUINO_SAMD_ZERO instead. Should support all arduino boards that have that #define ARDUINO_SAMD_ZERO in their board definitions.
Please get latest and retry. The idle and standby sleep modes for SAMD21 are supported.