Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add shortcuts from AntoHTTP and AntoMQTT to AntoIO
- Loading branch information
Showing
12 changed files
with
286 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* This example is meant to be used for beginner | ||
* | ||
* 2017/04/14 | ||
* by Anto.io team | ||
* | ||
*/ | ||
|
||
#include <AntoIO.h> | ||
|
||
const char *ssid = "your access point SSID"; | ||
const char *pass = "access point password"; | ||
const char *user = "your username"; | ||
const char *token = "your token"; | ||
const char *thing = "your thing"; | ||
|
||
AntoIO anto(user, token, thing); | ||
|
||
void setup() { | ||
Serial.begin(9600); | ||
anto.begin(ssid, pass, messageReceived); | ||
anto.sub("channel"); | ||
} | ||
|
||
void loop() { | ||
anto.loop(); | ||
anto.pub("other channel", 1); | ||
|
||
delay(3000); | ||
} | ||
|
||
void messageReceived(String thing, String channel, String payload) { | ||
Serial.print("Recieved: "); | ||
Serial.print(thing); | ||
Serial.print("/"); | ||
Serial.print(channel); | ||
Serial.print("-> "); | ||
Serial.println(payload); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#ifndef ANTO_COMMON_H | ||
#define ANTO_COMMON_H | ||
|
||
#define ANTO_VER "v0.7.1" | ||
#define ANTO_VER "v0.7.2" | ||
|
||
#endif /* ifndef ANTO_COMMON_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.