5565| 2
|
[讨论] PlainProtocol write 通过蓝牙发送 接收端数据时而为null |
#include <PlainProtocol.h> PlainProtocol mytest(Serial, 57600); const int waterPin = 10; void setup() { mytest.init(); pinMode(waterPin,INPUT); } void loop() { int t_analogValue;//analog t_analogValue = analogRead(0); //connect Steam sensors to Analog 0 int t_digitalValue = LOW; //default digital low t_digitalValue = digitalRead(waterPin); //low is sending if(t_digitalValue == LOW){ mytest.write("T_A|T_D",t_analogValue,t_digitalValue);//send analogValue and digitalValue } delay(1000); } |
© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed