I have connected DHT11 sensor to arduino and connect my arduino to white colour bolt in which bolt gnd is connected to arduino gnd and rx of bolt is connected to pin 4 of arduino and tx of bolt to ~3 of arduino
uart is selected
In Hardware configuration
i selected csv value you want to send = 2
baud rate = 9600
time = 5min
S/w configuration code :
setChartTitle(‘temprature’);
setChartType(‘lineGraph’);
setAxisName(‘time’,‘temprature’);
plotChart(‘time_stamp’,‘temprature’);
dataDownload(‘true’);
this is the done in the arduino ide
#include dht.h
#include SoftwareSerial.h
#include BoltIot-Arduino-Helper.h
#define DEBUG true
dht DHT;
#define DHT11_PIN 7
const int analogIn = A0;
int mVperAmp = 185; // use 100 for 20A module and 66 for 30A module
int RawValue = 0;
int ACoffset = 2500;
double Voltage = 0;
double Amps = 0;
void setup()
{
Serial.begin(9600);
boltiot.Begin(3,4); //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 the input. We will use send this pin’s state as the data to the bolt cloud
}
void loop()
{
boltiot.CheckPoll(digitalRead(2));
temp();
volt();
Serial.println();
}
void volt()
{
RawValue = analogRead(analogIn);
Voltage = (RawValue/1024.0)*5000; // Gets you mV
Amps = ((Voltage- ACoffset)/ mVperAmp);
Serial.print("Raw Value = “); // Shows pre-scaled value
Serial.print(RawValue);
Serial.print(”\t mV = “); //Shows The voltage measured
Serial.print(Voltage, 3); // the ‘3’ after voltage allows you to display 3 digits after decimal point
Serial.print(”\t Amps = "); // Shows the voltage measured
Serial.print(Amps, 3);// the ‘3’ after Amps allows you to display 3 digits after decimal point
Serial.println();
delay(2500);
}
void temp()
{
int chk = DHT.read11(DHT11_PIN);
Serial.print("Temperature = ");
Serial.println(DHT.temperature);
delay(1000);
}