Code compiling but not working

Hello! I am able to flash this custom code to my electron asset tracker V2 with no errors but then it is not working as expected. I’m not sure where to go from here. I have contacted the creator but I don’t think he is able to work with it. I know that it was created for the asset tracker V1 so there could be an issue there.

link to .ino file:
link to .cpp file
.h file:
link to tracking web page:

Seeing as it’s custom code, we have no idea what you expect it to do.

What does it do?
What doesn’t it do?
What do you expect it to do?
What have you tried already?

of course, expectations would be helpful!

The code is forked from the asset tracker library. Basically GPS readings on the build console as well as a webpage using google maps.

I am able to use the standard gps asset tracker code that the custom code is forked from.

The major difference in code is that the custom .ino file includes altitude which is necessary for a high altitude balloon.

When I compile the code (successfully) all lights turn off on the electron and no readings are given in the console or webpage.


The better starting point would be AssetTrackerRK as it’s built ontop of a more up to date GPS library.
And if you need help with that library @rickkas7 is usually very responsive on the forum.


With AssetTrackerRK you can get the altitude by:


or several other units if you prefer.

1 Like

Thanks, I’m going to look at it!

Thanks, i’m now closer than ever! I’m using the 6-backwardcompatibleapi.ino file and it is showing the GPS and battery successfully in the console as well as the google maps webpage but I’m still not seeing altitude in either. the webpage i’m using just says alt. NaN. Any ideas?

Have you got a fix on at least four satellites?

Ah, I see how that is necessary. How do I check that?

The TinyGPSPlus class contains a field satellites.