Tranfer the data Arduino to PC (HC-06)
how can transfer data read of gas sensor "arduino" pc bluetooh hc-06. should use arduino's software or platform?
this code
#include "dht.h"
#include "mq135.h"
#define dhtpin 5
#define analogpin 5
#define timeout 3000
#define dhttype dht11 // dht 11
dht dht(dhtpin, dhttype);
mq135 gassensor = mq135(analogpin);
void setup() {
serial.begin(9600);
dht.begin();
}
void loop() {
float h = dht.readhumidity();
float t = dht.readtemperature();
if (isnan(h) || isnan(t)) {
serial.println("failed read dht sensor!");
return;
}
float ppm = gassensor.getppm();
serial.print("t: ");
serial.print(t);
serial.print(" *c\t");
serial.print("h: ");
serial.print(h);
serial.print(" %\t");
serial.print("co2: ");
serial.print(ppm);
serial.println(" ppm");
delay(timeout);
}
help me please
this code
#include "dht.h"
#include "mq135.h"
#define dhtpin 5
#define analogpin 5
#define timeout 3000
#define dhttype dht11 // dht 11
dht dht(dhtpin, dhttype);
mq135 gassensor = mq135(analogpin);
void setup() {
serial.begin(9600);
dht.begin();
}
void loop() {
float h = dht.readhumidity();
float t = dht.readtemperature();
if (isnan(h) || isnan(t)) {
serial.println("failed read dht sensor!");
return;
}
float ppm = gassensor.getppm();
serial.print("t: ");
serial.print(t);
serial.print(" *c\t");
serial.print("h: ");
serial.print(h);
serial.print(" %\t");
serial.print("co2: ");
serial.print(ppm);
serial.println(" ppm");
delay(timeout);
}
help me please
i guess buy bluetooth shield or module , follow instructions come it.
Arduino Forum > Using Arduino > Networking, Protocols, and Devices (Moderator: fabioc84) > Tranfer the data Arduino to PC (HC-06)
arduino
Comments
Post a Comment