Graphing data

Thanks Andrew, that’s very kind. I have a set of fields already posting to TTN and decoding using a TTN decode script and they look correct in TTN. Question here: does your Thingspeak configuration reference your TTN data using the field names in the TTN decoder script? It occurs to me I have not tried that and it may prove the key to making it work.

Well I got that sorted out on Thingspeak finally. I had some trouble getting it to actually show the data - and that’s because it actually requires you to rename your TTN decoded values to say field1, field2 etc instead of the more useful names you might have chosen for them in the decoder - seems like a poor design decision to me as it renders the TTN dashboard very hard to read and it took a while to figure it out as it is a bit non-intuitive - to me anyway. Notwithstanding that it works well enough so far. Thanks for the help.

Glad you got it working. I’ve always just used the default Fieldn names, as these were in the first example I copied from the clever people at Sodaq. Their Arduino code sets up labels in the definitions section- if you did this you could call Label1 etc anything you want.

Definitions:
//Data labels, cannot change for ThingSpeak
#define LABEL1 “field1”
#define LABEL2 “field2”
#define LABEL3 “field3”

Later on you construct the url string:
`//Add key followed by each field
url += String(FIRST_SEP) + String(“key”);
url += String(LABEL_DATA_SEP) + String(WRITE_API_KEY);

url += String(OTHER_SEP) + String(LABEL1);
url += String(LABEL_DATA_SEP) + String(bme.readTemperature());

`