You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-3Lines changed: 20 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,23 @@ The library is divided into various classes:
49
49
- The `setDebugMessageLevel(uint8_t _debugLevel)` function is used to set a debug level. Every debug message comes with a level which goes from 0 to 4. Higher level means higher verbosity. Debug messages with level higher than `_debugLevel` will not been showed.
50
50
51
51
### ArduinoIoTCloud
52
-
[todo]
53
-
### CloudSerial
54
-
[todo]
52
+
53
+
- The `int begin(ConnectionManager *connection = ArduinoIoTPreferredConnection, String brokerAddress = "mqtts-sa.iot.arduino.cc")` function is used to initialize the connection to MQTT broker and to the cloud.
54
+
55
+
- The `connect()` function is used to connect to the MQTT broker and to the cloud
56
+
57
+
-`disconnect()` stops the MQTT Client
58
+
59
+
- The `update()` function checks the connnection with the MQTT broker, retrieve data from it and pushes back data using `writeProperties()`. `update()` is called periodically in the loop of .ino file.
60
+
61
+
-`connected()` simply returns the current status of the MQTT connection.
62
+
63
+
-`reconnect(Client&)` clean up existing MQTT connection, create a new one and initialize it by calling `connect()`
64
+
65
+
-`writeProperties(const byte data[], int length)` writes message to the MQTT Broker
66
+
67
+
-`setThingId(String const thing_id)` sets the *THING_ID*
68
+
69
+
-`getThingId()` returns the *THING_ID*
70
+
71
+
-`connectionCheck()` function is like `check()` from *ConnectionManager*. Uses a finite state machine and it's responsible for the connection to MQTT and the Cloud. It also uses *debugMessage* from *ConnectionManager* to print debug messages
0 commit comments