Data not plotting in bolt cloud via UART

I am trying to send the value of the LM35 sensor to the bolt cloud using UART communication. I have an Arduino UNO to which LM35 is connected at A0 pin. I am using the BoltIoT-Arduino-Helper.h library but the values are not showing. Upon downloading the CSV file I am only able to see RD as a variable value. I have checked the same on the forum but didn’t get any solution. This is a part of a bigger project that I am working on, so I don’t want to attach the sensor directly to the Bolt development board.

Here’s my Arduino Code :

#include <BoltIoT-Arduino-Helper.h>

#ifndef API_KEY
#define API_KEY   "xxxxxxxx"
#endif
#ifndef DEVICE_ID
#define DEVICE_ID "BOLTxxxx"
#endif


void setup() {
  // put your setup code here, to run once:
  boltiot.begin(Serial);
  pinMode(A0,INPUT);
}

void loop() {
  boltiot.processPushDataCommand(analogRead(A0));
  delay(1000);
}

I have tried using CheckPoll command also but no luck there too.
Here is the code of cloud dashboard:

setChartLibrary('google-chart');
setChartTitle('Your Graph Title');
setChartType('lineGraph');
setAxisName('X-Axis Name','Y-axis Name');
mul(0.0977);
plotChart('time_stamp','var0');

And here’s the graph:

Thanks in advance.

You have connected serial pins of arduino with bolt right?

Yes I have
Tx -> Rx and Rx -> Tx

What about GND pin ??

Yeah ! It works. Completely forgot about that.
Thanks

1 Like

Now If I have multiple sensor values then can I pass those values in the same push data command or I have to call it separately for each value.
Also, Can I plot all values on the same graph?

1 Like

For that use the command handler. Need a trial script?

Alright. Yeah sure it will be helpful.

You want to visualize directly to the cloud only right? Then use the same command, and separate the sensor readings with comma.

Like
boltiot.processPushDataCommand(analo...(A0), analo...(A1), analo...(A2), analo...(A3));

Make sure while creating the product in the hardware configuration, mention 4 CSV inputs for above case.

Yeah, both to the cloud and python script. For visualisation, do I have to like make 4 different graphs or is there a way to plot the values on same graph ?

For 4 values on same graph, table and line graph gives the flexibility. Check below sample -

setChartLibrary('google-chart');
setChartTitle('Your Graph Title');
setChartType('lineGraph');
setAxisName('X-Axis Name','Y-axis Name');
mul(0.0977);
plotChart('time_stamp','var0', 'var1', 'var2', 'var3');

You can do 4 different graphs as well. Sample -

var Graph1 = new boltGraph();
Graph1.setChartType("lineGraph");
Graph1.setAxisName('X-Axis Name','Y-axis Name');
Graph1.plotChart('time_stamp','var0');
var Graph2 = new boltGraph();
Graph2.setChartType("steppedGraph");
Graph2.setAxisName('X-Axis Name','Y-axis Name');
Graph2.plotChart('time_stamp','var1');
var Graph3 = new boltGraph();
Graph1.setChartType("scatterGraph");
Graph1.setAxisName('X-Axis Name','Y-axis Name');
Graph1.plotChart('time_stamp','var2');
var Graph4 = new boltGraph();
Graph2.setChartType("areaGraph");
Graph2.setAxisName('X-Axis Name','Y-axis Name');
Graph2.plotChart('time_stamp','var3');
1 Like

For python, refer to this thread -

Ok Thanks for your help!

1 Like