We'll show you how to have your TI LaunchPad check the tracking status of a FedEx package.
This sketch uses our FedEx > TrackingAndVisibility > TrackByNumber Choreo.
1Make sure you have a Temboo account. If you don't already have one, you can register for free.
2You'll also need a valid FedEx account which you can create here.
3Now, find the "Develop and Test" tab on the FedEx developers page and click the Get your test key button in the middle of the page.
4Once you've agreed to the terms of service agreement, filled in the registration fields, and accepted the Access Authorization License, you'll see a confirmation screen with your FedEx web services credentials. Make a note of these because you'll need them later.
5You'll also need your FedEx test password, which FedEx will email to you after you've completed the steps above.
6Copy and paste the credentials you received from FedEx into the Input fields on the FedEx TrackByNumber Choreo page. They should look similar to the screenshot below.
7Make sure to enter the value 'test' for the Endpoint input (unless of course you're using an existing FedEx account that is already in production mode - more on that later).
8Put the tracking number for the package you'd like to track in to the TrackingNumber field and test the Choreo by clicking the Generate Code button. If you're in test mode, you'll need to enter a package number that is in FedEx's test database. Here's one you can use: 123456789012.
9Your package is tracked! If you take a look at the value of the
Response output variable in the OUTPUT box, you should see an XML Response from FedEx.
NOTE: when you want to track your own packages i.e., not FedEx's test packages, then you'll need to apply for production API credentials. You can do that by following the instructions available from the "Move to Production" tab on the FedEx developers page.
10Now we'll generate code to call this Choreo from your LaunchPad. Select Texas Instruments from the drop down menu, then choose your board. Make sure that you've added details about how your LaunchPad is connected to the internet.
11Scroll down to the CODE section of the Library page. Then Copy the code, and paste it into a new sketch in Energia.
In order to run this sketch on your LaunchPad, it needs to be configured with an appropriate
TembooAccount.h header file that contains your Temboo account information.
12Make a new tab in Energia, and name it
13Scroll past the CODE snippet box to the HEADER FILE snippet. Copy and paste the contents into your
14The final step before running any sketch is to confirm that you've selected the appropriate board and serial port in Energia. Go to the Tools > Board menu and select the LaunchPad you're working with. Then go to Tools > Serial Port and select the port your board is connected to.
Select your board and port from the Energia Tools menu
15With both files in place you are ready to upload the sketch. Open the serial monitor and find out what your package is up to right now!
This Choreo returns a lot of XML, and you're probably not interested in all of it. Temboo gives you the power to filter out anything you don't want from a Choreo response, returning only the pieces of data that are most useful to your application. Once you've got the basic sketch working, you should definitely check out Output Filters.
Now that you know when your package is going to arrive, why not check out the other 2000+ Choreos in our Library and start thinking about all the possibilities for your next LaunchPad project.
We're always happy to help. Just email us at firstname.lastname@example.org, and we'll answer your questions.