Bjoerns-TB / ttn-gps-tracker

GPS Tracker for TTN
GNU General Public License v3.0
17 stars 16 forks source link

Low-power for feather m0? #1

Open gymnae opened 5 years ago

gymnae commented 5 years ago

First of: Thank you very much for your code and tremendous work in your blog. Thanks to you, I got my Feather M0 with LoRa and GPS feather transmitting to ttn in less than a day.

Now my goal is to push this data to APRS.fi for mapping, but that is a different deal. I tried to get the lowpower version to work, but I encountered two errors:

#include "LowPower.h"

Requires to install the low-power library from rocketscream, correct? I did this, but it won't compile:

ttn_gps_tracker_lowpower.ino:270:16: error: 'class LowPowerClass' has no member named 'powerDown'
       LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);

Furthermore:

ttn_gps_tracker_lowpower.ino:274:11: error: 'cli' was not declared in this scope
       cli();
           ^
ttn_gps_tracker_lowpower.ino:276:11: error: 'sei' was not declared in this scope
       sei();
           ^

I take it this may be due to incompatibility with the M0 chip?

I might have missed your blog entry explaining how you implemented low power with this library. Cheers

Bjoerns-TB commented 5 years ago

The LowPower Library does not support powerDown on the M0. You can put the M0 into standby with LowPower.standby, but you have to use internal RTC for wakeup.