Bluetooth 使用蓝牙技术在MIT应用程序inventor 2上安装水泵

Bluetooth 使用蓝牙技术在MIT应用程序inventor 2上安装水泵,bluetooth,arduino,sensors,Bluetooth,Arduino,Sensors,我有一个学校项目,我必须使用dht传感器感知温度和湿度参数,并通过蓝牙hc05将数据传输到使用MIT App Inventor 2的android设备 从应用程序中,用户可以在单击“泵打开”时打开泵,在单击“泵关闭”时关闭泵 目前,我能够感应温度和湿度,并通过蓝牙将数据传输到应用程序上显示 #包括 #包括 dht-dht; #定义DHT11_引脚6 int bluetoothTx=10;//蓝牙发送至10针 int bluetoothRx=11;//蓝牙接收到11针 软件串行蓝牙(blueto

我有一个学校项目,我必须使用dht传感器感知温度和湿度参数,并通过蓝牙hc05将数据传输到使用MIT App Inventor 2的android设备

从应用程序中,用户可以在单击“泵打开”时打开泵,在单击“泵关闭”时关闭泵

目前,我能够感应温度和湿度,并通过蓝牙将数据传输到应用程序上显示

#包括
#包括
dht-dht;
#定义DHT11_引脚6
int bluetoothTx=10;//蓝牙发送至10针
int bluetoothRx=11;//蓝牙接收到11针
软件串行蓝牙(bluetoothTx、bluetoothRx);
无效设置()
{
Serial.begin(9600);
蓝牙开始(9600);
}
void循环()
{
int chk=DHT.read11(DHT11_引脚);
{
//串行打印(“温度=”);
蓝牙打印(DHT温度,1);
bluetooth.print(“|”);
//Serial.print(“湿度=”);
蓝牙打印(DHT湿度,1);
bluetooth.println(“|”);
延迟(1000);
}
}