Has anyone used this sensor with the Dash? I built the asset tracker and would like to save battery. My goal is to connect the ADXL345 to the Dash over I2C and use it to detect when there is no movement. When there is no movement, I want the dash to go to sleep and the connected GPS to turn off. What is the smartest way to do this? The new 345 has a sleep feature. Can I use that to control everything? I thought about using a relay to kill the power on the GPS as it uses the most power. Thanks!
Surely someone has done this before. Afterall, you can just purchase a shield from the competitor that does this already. I would prefer to stick with Hologram.
Adafruit has an Arduino library (https://github.com/adafruit/Adafruit_ADXL345) for that sensor. I looked through the library and it should work in I2C mode with the Dash. The library uses Wire for the I2C driver, which is supported by the Dash.
I read a bit about the auto-sleep feature on the ADXL345. Very cool! It looks like you can set 1 of the 2 interrupt outputs to be triggered by the same Inactivity trigger that is used for sleep mode. Connect that interrupt pin to a Dash IO pin and either configure it for interrupt or poll the IO for a level change. Then you can turn off the GPS and put the Dash (and the modem) into sleep mode.
You could even configure the other interrupt pin for Activity, connect it to a wake up pin on the Dash, configure that pin for deep sleep wakeup, and use it to wake the Dash again from deep sleep.
Sounds like a really great project. Let us know how it goes.
@Erik Thanks for the feedback. Youve helped me out twice this week. I think I will do as you said and use one interrupt to put the dash to sleep and one to wake it up. Im using Bens asset tracker sketch, so how long do you think it will take for the dash to come out of a deep sleep and report a gps ping? I want to save max battery during non movement but I dont want to loose too many tracks if it takes too long to start reporting.
As for the Adafruit Ultimate gps, can I turn the power off digitally or do i need to add a relay?
I just learned how to use sketch up and now printing on the form2. Ill add photos soon. Thanks again for all your help.