Asset tracker v2 accelerometer

Hello guys

I have an asset tracker v2 with an electron and using the sample code / libraries for the accelerometer given by particle but cannot make it work

Any of you can provide me please a project where it is working?


Try the AssetTrackerRK library - there are some more samples too.


Im already using AssetTrackerRK library, but still not working.
GPS working good but accelerometer is not.

Try the 4_AccelerometerSamples example and see if you have any output.

Also since the LIS3DH on the AssetTracker uses SPI, make sure you’re not using pins A2, A3, A4, or A5 for anything else.


Thanks Rick,

Where can I find that 4_AccelerometerSamples?


Then click the USE THIS EXAMPLE button to make a new project from the library example.

Rick, now I have another issue:

What happens is: I take the assets to the street, for couple minutes the GPS is working good, after 2 hours, one or two stop working, not receiving cords, even when reset, flash, not going back to life.

The weird thing is after couple hours the signal can be back again, and the same… after couple minutes or hours stop sending location, even when using the function to get GPS again is always giving 0.

Sometimes is not getting signal after one day in the street, so it’s weird because at least 1 time should have received GPS data.

Having all of them in the same room, let’s say 2-3 out of 10 stop working, then those 3 get signal and other 3 starts failing…

I start using cell tower identification to locate the assets and its always working but the GPS is not

Is there any issue known with GPS from the latest OS releases?

Any of you guys have issues with the hardware of the asset tracker v2? or should I focus on software only?


Are you using an external GPS antenna?

Yes, I’m using external GPS antenna

That’s not expected. Make sure you are calling updateGPS() very frequently - every loop and make sure you aren’t doing anything the can block the loop from executing, like calling delay().

Or use startThreadedMode() to enable threaded mode so you don’t need to do that.