Good afternoon everyone
I hope this is a simple one - I'm trying to write some data to IO from a Feather FONA using the MQTT library. I've successfully written data in a CSV format with the output VALUE, LONGITUDE, LATITUDE. It's written, seemingly automatically, to IO with the column headers "Created at", "Value", and "Location".
My first question is how to split the "Location" data to be Longitude and Latitude, as is seen in this screenshot from one of the many tutorials out there.
My second question, building on the first, is how to define my own data variables in IO. For instance, if I wanted to save satellite angle? Do I need to write this to another feed?
Thank you!
Adafruit IO Feed variable value?
Moderators: adafruit_support_bill, adafruit
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
- brubell
- Learn User Page
- Posts: 2010
- Joined: Fri Jul 17, 2015 10:33 pm
Re: Adafruit IO Feed variable value?
The location data should be sent separately as lat/lon/ele fields (see: https://io.adafruit.com/api/docs/#create-data):My first question is how to split the "Location" data to be Longitude and Latitude, as is seen in this screenshot from one of the many tutorials out there.
Code: Select all
{
"id": "string",
"value": "string",
"feed_id": 0,
"feed_key": "string",
"created_at": "datetime",
"location": {},
"lat": 0.0,
"lon": 0.0,
"ele": 0.0,
"created_epoch": 0,
"expiration": "datetime"
}
Ideally, define it in another feed. You could store it as IO-formatted JSON, too. https://io.adafruit.com/api/docs/cookbo ... oring-jsonMy second question, building on the first, is how to define my own data variables in IO. For instance, if I wanted to save satellite angle? Do I need to write this to another feed?
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.