Project for course Appliance of MCU, School of Electrical engineering, Uni of Belgrade

Dependencies:   19E042PIM_MB_PINS Adafruit_GFX MAX44000 mbed-mqtt

Files at this revision

API Documentation at this revision

Comitter:
pavleradojkovic
Date:
Sat Feb 11 21:32:49 2023 +0000
Parent:
4:b08e3f8e89bd
Commit message:
Round 2 initial

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed_app.json Show annotated file Show diff for this revision Revisions of this file
diff -r b08e3f8e89bd -r e64e216e1ca6 main.cpp
--- a/main.cpp	Mon Jul 04 13:23:05 2022 +0000
+++ b/main.cpp	Sat Feb 11 21:32:49 2023 +0000
@@ -6,7 +6,7 @@
 #include "Adafruit_GFX.h"
 #include "Adafruit_GFX_Config.h"
 #include "Adafruit_SSD1306.h"
- 
+#include "string.h"
  
 // LED2 blinking rate:
 #define BLINKING_RATE_MS                                                     250
@@ -27,6 +27,8 @@
 #define HALF_INTERVAL                                                       0.5f
 // I2C frequency:
 #define I2C_FREQUENCY                                                     400000
+// Blinking rate in milliseconds
+
 
 // Global Variables 
 //I2C
@@ -122,7 +124,7 @@
     MQTTPacket_connectData data = MQTTPacket_connectData_initializer;
     // Change only ID and protocol version:
     data.MQTTVersion = 3;
-    data.clientID.cstring = "NUCLEO-L476RG-64";
+    data.clientID.cstring = "NUCLEO-L476RG-101";
     // Connect the 
     int rc = 0;
     if ((rc = client.connect(data)) != 0)
@@ -157,6 +159,8 @@
         myOled.display();
         thread_sleep_for(BLINKING_RATE_MS);
         myOled.clearDisplay();
+
+        wait_ms(500);
     }
 }
 
diff -r b08e3f8e89bd -r e64e216e1ca6 mbed_app.json
--- a/mbed_app.json	Mon Jul 04 13:23:05 2022 +0000
+++ b/mbed_app.json	Sat Feb 11 21:32:49 2023 +0000
@@ -2,11 +2,11 @@
     "config": {
         "wifi-ssid": {
             "help": "WIFI SSID",
-            "value": "\"MAESTRO\""
+            "value": "\"Kupus\""
         },
         "wifi-password": {
             "help": "Wifi Password",
-            "value": "\"matish998\""
+            "value": "\"dinarska1\""
         }
     },
     "target_overrides": {