sparkfun DEV-17272 Hook-Up Manual page 28

Micromod asset tracker carrier board
Table of Contents

Advertisement

The code provides a warning that "deactivate profile failed". We see this because the SARA needs to disconnect
from a profile before it can connect to a new one, and in this case this failed because there was no profile active.
Don't worry about this warning, it is just there for information. The example shows that our connection was
successful by displaying the Internet Protocol (IP) address the SARA has been allocated by the service operator.
Example 18: Ping
Example18 tests the SARA's data connection by performing one of the oldest and shortest data transfers going...
A ping!
The code will ask for the name of the server you want to ping. www.google.com is a good choice, but
www.sparkfun.com works too! If the ping is successful, you will see the time it took for the ping to do a round trip
in milliseconds.
Having trouble seeing the detail in this image? Click on it for a larger view.
If the ping is not successful, one option to find out why is to uncomment the line which says:
assetTracker.enableDebugging(SERIAL_PORT); // Uncomment this line to enable helpful debug messag
es
This enables a bunch of helpful debug messages that print in the Serial Monitor or your terminal emulator window.
After uncommenting the above line, upload the code again.
Look for any messages that include +UUPINGER:. That will give you the cause of the PING ERror. The SARA-R5
AT Command Reference contains the full list of Ping error codes in Appendix A.10.
For example, error 8 means that the SARA "Cannot resolve host" which is usually a sign that a Domain Name
Server (DNS) is not available. Error 17 indicates "Packet Switched Data connection not established". If you see
errors like this, please make sure you ran examples 13, 14, 17 and 18 in order. Each builds on the previous
example.
Example 19: ThingSpeak
Example19 demonstrates how to send data to ThingSpeak using HTTP POST or GET.
Prior to using this example you need to complete the following steps:
Create a ThingSpeak User Account here
Create a new Channel by selecting Channels --> My Channels --> New Channel
Note the Write API Key and copy/paste it into
The example code reads the temperature from the Asset Tracker IMU and POSTs it to ThingSpeak. It will be
added to your ThingSpeak channel as "Field 1".
Note: The IMU temperature is always a few degrees warmer than ambient as it is inside a nice warm chip
busy running accelerometer, gyro and compass sensors!
in the example code.
myWriteAPIKey

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DEV-17272 and is the answer not in the manual?

Questions and answers

Table of Contents