Dear Friends,
I am trying to send the sensor data which is being collected from arduino to BOLT and storing it to bolt cloud for further data manipulation. I have made the connection as follows,
- TX pin from bolt to Rx pin in arduino.
- TX pin from arduino to Rx pin in bolt.
- GRND fom arduino to GND in BOLT.
- 5V pin in arduino to 5V pin BOLT.
- Connected DHT11 temperature sensor to arduino. (Data pin from DHT11 is connected to pin 2 in arduino).
Arduino Code:
#include <BoltIoT-Arduino-Helper.h>
#include “DHT.h”
#define DHTPIN 2
#define DHTTYPE DHT11
#ifndef API_KEY
#define API_KEY “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
#endif
#ifndef DEVICE_ID
#define DEVICE_ID “xxxxxxxxxxxxxxxxxxxxxx”
#endif
DHT dht(DHTPIN, DHTTYPE);
void setup() {
boltiot.Begin(Serial); //Initialize the Bolt interface over software serial uart.
//In this example Tx pin of Bolt is connected to pin 3 of Arduino
//and Rx pin of Bolt is connected to pin 4 of Arduino
pinMode(2,INPUT); //Set pin 2 as input. We will send this pin’s state as the data to the Bolt Cloud
dht.begin();
}
void loop() {
float t = dht.readTemperature();
boltiot.CheckPoll(t); //Send data to the Bolt Cloud, when the Bolt polls the Arduino for data.
//This function needs to be called regularly. Calling the CheckPoll function once every seconds is required
}
Code in BOLT clould
setChartLibrary(‘google-chart’);
setChartTitle(‘Temperature’);
setChartType(‘lineGraph’);
setAxisName(‘Time’,‘Temperature’);
plotChart(‘time_stamp’,‘temp’);
But I cannot send the data to could please do help me in this issue.
Thank You In Advance.