This repository was archived by the owner on Jan 28, 2021. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey, this is my first pull request hope I did everything right.
I added the ability to power off the GPS device. I worked with this protocol specification.
My initial testing with a Sparkfun SAM-M8Q board and a not that reliable USB power meter showed a current drop of 30mA. Together with the ESP32 deepsleep the reading was at 0.00A This should be validated with a better test setup though. That's also why I haven't added an additional example yet.
Furthermore can you guys have a look at the return statements. I guess I'm comparing to the wrong value or the GPS just doesn't acknowledge a power off command.
I tested with EXINT0 and UARTRX as interrupt pins and it behaved as expected.
As described here activity on some pins wake up the device. Although the I2C pins are not named there, when querying "getLatitude()" or similar extensively via a I2C connection the device seems to wake up too. Can you reproduce this?
Some further testing revealed that when using powerOffWithInterrupt() small voltage edges on presumably the interrupt pin are detected (can't check) and wake the device. I got a good result again when also putting my ESP32 in deepsleep at the same time.
Best
My test code is as folllows and uses an ESP32 WROOM connected via I2C and the INT pin:
GitHub code formatting doesn't like my code... sry :o
simple_ublox_pwr_off.txt