Skip to content

Commit 516cbba

Browse files
committed
update README, library version
1 parent ec57e37 commit 516cbba

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,12 @@ Add a callback listener to the event.
170170

171171
---
172172

173-
**bool MicroGear::connect(char* appid)**
173+
**int MicroGear::connect(char* appid)**
174174

175-
Connect to NETPIE. If succeed, a CONNECTED event will be fired.
175+
Connect to NETPIE. If succeed, a CONNECTED event will be fired. The function returns the following code
176+
* *NETPIECLIENT_CONNECTED* - The connection is successful.
177+
* *NETPIECLIENT_NOTCONNECTED* - The connection to the broker cannot be initiated.
178+
* *NETPIECLIENT_TOKENERROR* - An access token is not issued, may be because an appid, a key or a secret is invalid.
176179

177180
**arguments**
178181
* *appid* - an App ID.

README.th.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,10 @@ microgear.init("sXfqDcXHzbFXiLk", "DNonzg2ivwS8ceksykGntrfQjxbL98", "myplant");
165165

166166
**bool MicroGear::connect(char* appid)**
167167

168-
เชื่อต่อกับ NETPIE platform ถ้าเชื่อมต่อสำเร็จ จะมี event ชื่อ CONNECTED เกิดขึ้น
168+
เชื่อต่อกับ NETPIE platform ถ้าเชื่อมต่อสำเร็จ จะมี event ชื่อ CONNECTED เกิดขึ้น ค่าที่ส่งคืนมาจากฟังก์ชั่น มีดังนี้
169+
* *NETPIECLIENT_CONNECTED* - การเชื่อมต่อสำเร็จ
170+
* *NETPIECLIENT_NOTCONNECTED* - การเชื่อมต่อล้มเหลว เช่นมีปัญหาเรื่องเครือข่าย
171+
* *NETPIECLIENT_TOKENERROR* - ไม่ได้รับ access token อาจเป็นเพราะ appid, key หรือ secret ไม่ถูกต้อง
169172

170173
**arguments**
171174
* *appid* - App ID.

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ESP8266 Microgear
2-
version=1.1.9
2+
version=1.2.0
33
author=Chavee Issariyapat <i@chavee.com>
44
maintainer=Chavee Issariyapat <i@chavee.com>
55
sentence=A client library for ESP8266 to connect to NETPIE IOT Platform.

0 commit comments

Comments
 (0)