Bolt IoT with Arduino UNO Serial Communication

Hi, I need help for a project I am currently working on.
The MQ2 and MQ7 sensor values ​​must be displayed on the BoltCloud line graph
What modification is required in Arduino programming

#include<LiquidCrystal.h>

LiquidCrystal lcd(12,11,5,4,3,2);

String mq2sensor(String *data){
return String(analogRead(A0));
}

String mq7sensor(String *data){
return String(analogRead(A1));
}

void setup()
{
  pinMode(A0,INPUT);
  pinMode(A1,INPUT);
  pinMode(8,OUTPUT);      //configure pin 8 as output
  
  lcd.begin(16,2);
  lcd.setCursor(3,0);
  lcd.print("POLLUTION");
  lcd.setCursor(0,1);
  lcd.print("DETECTION SYSTEM");         //Display starting message
  delay(5000);
  lcd.clear();                 //clear lcd
}

void loop()
{    
    float pollution1=analogRead(mq2sensor);     //read the value of sensor
    float pollution2=analogRead(mq7sensor);     //read the value of sensor

    Serial.println(pollution1, 0);
    delay(4000);
    Serial.println(pollution2, 0);
    delay(4000);
    
    lcd.clear();
    lcd.setCursor(2,0);
    lcd.print("Pollution");
    lcd.setCursor(2,1);
    lcd.print("HC = ");
    lcd.print(pollution1);  
    delay(4000);             

    lcd.clear();
    lcd.setCursor(2,0);
    lcd.print("Pollution");
    lcd.setCursor(2,1);
    lcd.print("CO = ");
    lcd.print(pollution2);  
    delay(4000); 

    if(pollution1>=500){      
      digitalWrite(8,HIGH); }  //turn on the warning led   
     else  {
      digitalWrite(8,LOW); }  //turn off the warning led  
    
    if(pollution1>=500){      
      digitalWrite(8,HIGH); }  //turn on the warning led   
     else  {
      digitalWrite(8,LOW); }  //turn off the warning led  
                
    if(pollution1>=600){      
      lcd.clear();
      lcd.setCursor(2,0);
      lcd.print("Warning");
      lcd.setCursor(2,1);
      lcd.print("HC High");    //display warning message    
      delay(2000);  
    }

    if(pollution2>=600){      
      lcd.clear();
      lcd.setCursor(2,0);
      lcd.print("Warning");
      lcd.setCursor(2,1);
      lcd.print("CO High");    //display warning message 
      delay(2000);     
    }
}

Hi @pavanesleeba,

There are quite a few things you need to do to integrate your full circuit to push data to the Bolt Cloud and view the data there.
Here is the minimum that you will have to do.

Step 1:
Create a product on the Bolt Cloud of the type Input and UART,

Step 2:
Configure the product, to log 2 CSV values

Step 3:
Add the following code to the product in the code section:

var lineGraph1 = new boltGraph();
lineGraph1.setChartType("lineGraph");
lineGraph1.setAxisName('Time','mq2-data');
lineGraph1.plotChart('time_stamp','mq2sensor');
var lineGraph2 = new boltGraph();
lineGraph2.setChartType("lineGraph");
lineGraph2.setAxisName('Time','mq7-data');
lineGraph2.plotChart('time_stamp','mq7sensor');

Step 4: Save the product configurations and link you Bolt WiFi module to the Product.

Step 5: This is the minimal Arduino Code you will need to upload to the Arduino to push the mq sensor data to the Bolt Cloud. You can modify it later to take care of showing the data on the LCD

#include<BoltIoTArduinoHelper.h>


String pushData(String *data){
  return String(analogRead(A0)) + "," + String(analogRead(A1));
}

void setup(){
  boltiot.begin(Serial);
  boltiot.setCommandString("RD\r",pushData);
}

void loop(){
  boltiot.handleCommand();
}

(I assume that you have already installed the Bolt IoT Arduino Helper library here)

Once this is done, power up the circuit, make sure that the Bolt WiFi module is connected to the internet, click on the deploy configuration button on the Bolt Cloud and then click on device view. You will be able to see the sensor data on the device view.