![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
fdrtgff
Diff: main.cpp
- Revision:
- 102:2591f689e242
- Parent:
- 101:bea6b4cfedac
- Child:
- 103:e61ad04d14f2
diff -r bea6b4cfedac -r 2591f689e242 main.cpp --- a/main.cpp Tue Apr 19 07:21:10 2022 +0000 +++ b/main.cpp Thu May 26 06:11:34 2022 +0000 @@ -5,9 +5,12 @@ //D12 TRIGGER D11 ECHO HCSR04 sensor(D12, D11); - +DigitalOut rele(D7); - +if (distance <= 0) { + printf("scan() failed with return value: %d\n", count); + return 0; + } #include "MQTTmbed.h" #include <MQTTClientMbedOs.h> @@ -138,11 +141,11 @@ data.MQTTVersion = 3; - data.clientID.cstring = "ric-demo-room-device-my"; + data.clientID.cstring = "mqtt-timirlan_davletshin-6wtths"; data.username.cstring = "111"; - data.password.cstring = "1234567"; + data.password.cstring = "111"; if ((rc = client.connect(data)) != 0)