tuzni pokusaj resavanja zadatka

Dependencies:   19E042PIM_MB_PINS

Files at this revision

API Documentation at this revision

Comitter:
yu5eea
Date:
Sat Dec 11 16:02:19 2021 +0000
Parent:
2:ff63eff307ef
Commit message:
jos tuzniji pokusaj

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r ff63eff307ef -r c5a6268735f2 main.cpp
--- a/main.cpp	Sat Dec 11 15:49:42 2021 +0000
+++ b/main.cpp	Sat Dec 11 16:02:19 2021 +0000
@@ -45,6 +45,7 @@
 
 char* topic = "pubpim-1";
 char* topic_sub = "subpim";
+char poruka;
 // Counter of arrived messages:
 int arrivedcount = 0;
 // Flag indicating that button is not pressed:
@@ -123,6 +124,8 @@
     //printf("Message arrived: qos %d, retained %d, dup %d, packetid %d\r\n", message.qos, message.retained, message.dup, message.id);
     printf("Message from the browser: %.*s\r\n", message.payloadlen, (char*)message.payload);
     ++arrivedcount;
+    poruka = (char*)message.payload;
+    printf("%c", poruka);
 }
 
 void buttonFunction() {