Skip to content

Commit 41050ec

Browse files
committed
merge README.md
2 parents 9a41fa0 + 448b28b commit 41050ec

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

README.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,18 @@
33
microgear-esp8266-arduino is a client library that is used to connect an ESP8266 chip to the NETPIE Platform's service for developing IoT applications. For more details on the NETPIE Platform, please visit https://netpie.io .
44

55
## Compatibility
6+
67
We have tested this library and found it compatible with (but not limited to) the following hardware
78
- ESP8266-01, 07, 12E, 12F
89
- NodeMCU v1, v2, V3
910
- Espresso Lite v2.0
1011

12+
## Outgoing Network Port
13+
14+
Make sure ther following ports are allowed to connect from your network.
15+
- Non-TLS mode : 8080 and 1883 (the library uses this mode by default)
16+
- TLS mode : 8081 and 8883 (still under testing)
17+
1118
## Installation
1219
* Download Arduino IDE 1.6.9 or later from https://www.arduino.cc/en/Main/Software
1320
* After installation, open Preferences
@@ -182,6 +189,15 @@ Check the connection status, return true if it is connected.
182189

183190
---
184191

192+
**void MicroGear::useTLS(bool* enabled)**
193+
194+
Switch between uncrypted and TLS mode (by default the library does not use TLS). This function must be called before the connection is made.
195+
196+
**arguments**
197+
* *enabled* - set to TRUE to use TLS.
198+
199+
---
200+
185201
**void MicroGear::setAlias(char* alias)**
186202

187203
microgear can set its own alias, which to be used for others make a function call chat(). The alias will appear on the key management portal of netpie.io .
@@ -191,21 +207,31 @@ microgear can set its own alias, which to be used for others make a function cal
191207

192208
---
193209

194-
**void MicroGear::chat(char* target, char* message)**
195-
210+
**bool MicroGear::chat(char* target, char* message)**<br />
211+
**bool chat(char* target, int message);**<br />
212+
**bool chat(char* target, double message);**<br />
213+
**bool chat(char* target, double, int decimal);**<br />
214+
**bool chat(char* target, String message);**<br />
215+
196216
**arguments**
197217
* *target* - the alias of the microgear(s) that a message will be sent to.
198218
* *message* - message to be sent.
219+
* *decimal* - number of digits after the deimal point.
199220

200221
---
201222

202-
**void MicroGear::publish(char* topic, char* message [, bool retained])**
223+
**bool MicroGear::publish(char* topic, char* message [, bool retained])**<br />
224+
**bool MicroGear::publish(char* topic, double message [, bool retained]);**<br />
225+
**bool MicroGear::publish(char* topic, double message, int decimal [, bool retained]);**<br />
226+
**bool MicroGear::publish(char* topic, int message [, bool retained]);**<br />
227+
**bool MicroGear::publish(char* topic, String message [, bool retained]);**<br />
203228

204229
In the case that the microgear want to send a message to an unspecified receiver, the developer can use the function publish to the desired topic, which all the microgears that subscribe such topic will receive a message.
205230

206231
**arguments**
207232
* *topic* - name of topic to be send a message to.
208233
* *message* - message to be sent.
234+
* *decimal* - number of digits after the deimal point.
209235
* *retained* - retain a message or not, the default is false (optional))
210236

211237
---

0 commit comments

Comments
 (0)