Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add pushOwner
  • Loading branch information
chaiwith committed Apr 18, 2018
commit 171036c51c1442143c4ac5fc1c81ebba7194eb3c
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,19 @@ microgear.writeFeed("homesensor","{temp:25.7,humid:62.8,light:8.5}");

To send a revoke token control message to NETPIE and delete the token from cache. As a result, the microgear will need to request a new token for the next connection.

---
**void microgear.pushOwner (char *message)**<br/>
**void microgear.pushOwner (double *message)**<br/>
**void microgear.pushOwner (int *message)**<br/>
**void microgear.pushOwner (String *message)**<br/>
push notification to NETPIE mobile application

**arguments**
* *message* - message to be sent

```js
microgear.pushOwner("temp:25.7");
```
---

**void MicroGear::loop()**
Expand Down
12 changes: 12 additions & 0 deletions README.th.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,19 @@ microgear.writeFeed("homesensor","{temp:25.7,humid:62.8,light:8.5}");
ส่งคำสั่ง revoke token ไปยัง netpie และลบ token ออกจาก cache ส่งผลให้ microgear ต้องขอ token ใหม่ในการเชื่อมต่อครั้งต่อไป

---
**void microgear.pushOwner (char *message)**<br/>
**void microgear.pushOwner (double *message)**<br/>
**void microgear.pushOwner (int *message)**<br/>
**void microgear.pushOwner (String *message)**<br/>
ส่งการแจ้งเตือน ไปยัง NETPIE mobile application

**arguments**
* *message* - ข้อความ

```js
microgear.pushOwner("temp:25.7");
```
---
**void MicroGear::loop()**

method นี้ควรถูกเรียกใน arduino loop() เป็นระยะๆ เพื่อที่ microgear library จะได้ keep alive connection alive และจัดการกับ message ที่เข้ามา