Project for course Appliance of MCU, School of Electrical engineering, Uni of Belgrade
Dependencies: 19E042PIM_MB_PINS Adafruit_GFX MAX44000 mbed-mqtt
Diff: main.cpp
- Revision:
- 5:e64e216e1ca6
- Parent:
- 4:b08e3f8e89bd
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); } }