Filip Stevanovic 2020/0039
Dependencies: Adafruit_GFX 19E042PIM_MB_PINS
Revision 5:b4c6bef81c0b, committed 2021-12-11
- Comitter:
- filip_ste
- Date:
- Sat Dec 11 16:28:50 2021 +0000
- Parent:
- 4:55d5519a06a1
- Commit message:
- Filip Stevanovic 2020/0039
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 55d5519a06a1 -r b4c6bef81c0b main.cpp --- a/main.cpp Sat Dec 11 16:09:42 2021 +0000 +++ b/main.cpp Sat Dec 11 16:28:50 2021 +0000 @@ -36,7 +36,7 @@ const char* topic_sub = "subpim"; const char* topic_pub = "pubpim"; const char* hostname = "broker.hivemq.com"; -int port = 1883; +const int port = 1883; Timer t; AnalogIn pot1(MB_POT1); @@ -86,8 +86,6 @@ /////////////////////////////////////////////////////////////// - - void messageArrived(MQTT::MessageData& md) { MQTT::Message &message = md.message; @@ -100,8 +98,8 @@ recv = s; - sprintf(buf, "%s", s.c_str()); - printMQTT(); + //sprintf(buf, "%s", s.c_str()); + //printMQTT(); if(s == "start") { @@ -149,7 +147,6 @@ i2c_obj.frequency(400000); - while(1) { if (t.read() > 10) { sendValue();