This example was kept fairly basic to illustrate how to do JSON data fetching and display the data on the MagTag.
A number of additions could be useful. Note, more elaborate display techniques might be beyond the capabilities of the adafruit_magtag
library but could be implemented in more discrete code.
Low Power
It is likely one charge of the battery might last a month or so with this change and checking the data once a day. The deep sleep code is still beta, additional savings may be seen. If the display doesn't update after the launch, be sure to charge the battery for awhile.
Countdown to Launch
Use Adafruit IO to get the correct local time and make a display of the days, hours, and minutes until launch. See the following code examples for time manipulation (warning: more intermediate skills may be needed):
The NeoPixels could light up to let the user know a launch is imminent or a sound could be made. This will draw more power and shorten battery life. This isn't a worry if always on USB power.
Launchpad
The launchpad data was a text field in the previous version of the API. Often details
contains the launchpad data too. Either have a function to convert the new launchpad number to a known value or parse it from the details. An example in details
is "LC-39A, Kennedy Space Center".
Other Space APIs
I chose SpaceX as I live near Cape Canaveral and I like to watch the launches. There are other space launch data feeds that could be used with changes to the URL, fields used, and formatting. For example, see:
- RocketLaunch.Live - Rocket Launch API
Page last edited March 08, 2024
Text editor powered by tinymce.