Author Topic: Is LowPowerLab Low-Power Library only for Moteinos?  (Read 2011 times)

arf

  • NewMember
  • *
  • Posts: 20
Is LowPowerLab Low-Power Library only for Moteinos?
« on: June 07, 2021, 10:09:17 PM »
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

  • Jr. Member
  • **
  • Posts: 57
Re: Is LowPowerLab Low-Power Library only for Moteinos?
« Reply #1 on: June 07, 2021, 11:46:08 PM »
Per the README file:

Quote
Lightweight 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

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Is LowPowerLab Low-Power Library only for Moteinos?
« Reply #2 on: June 08, 2021, 09:24:37 AM »
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

  • NewMember
  • *
  • Posts: 20
Re: Is LowPowerLab Low-Power Library only for Moteinos?
« Reply #3 on: June 16, 2021, 11:09:32 PM »
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

  • Jr. Member
  • **
  • Posts: 57
Re: Is LowPowerLab Low-Power Library only for Moteinos?
« Reply #4 on: June 17, 2021, 02:41:00 AM »
It appears this library has limited functionality with SAMD21 based microcontrollers including the M0. (Or atleast limited examples).

See: https://lowpowerlab.com/forum/moteino-m0/compilation-error-for-examples-'please-ensure-chosen-mcu-is-a-samd21'/msg29041/?topicseen#msg29041

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Is LowPowerLab Low-Power Library only for Moteinos?
« Reply #5 on: June 17, 2021, 12:47:06 PM »
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.