Work on LPC824. Blynk library for embedded hardware. Works with Arduino, ESP8266, Raspberry Pi, Intel Edison/Galileo, LinkIt ONE, Particle Core/Photon, Energia, ARM mbed, etc. http://www.blynk.cc/
Dependents: ESP8266BlynkWeatherStation TEST123
Fork of Blynk by
BlynkApi< Proto > Class Template Reference
Represents high-level functions of Blynk. More...
#include <BlynkApi.h>
Public Member Functions | |
bool | connect (unsigned long timeout=BLYNK_TIMEOUT_MS *3) |
Connects to the server. | |
void | disconnect () |
Disconnects from the server. | |
bool | connected () |
bool | run (bool available=false) |
Performs Blynk-related housekeeping and processes incoming commands. | |
template<typename T > | |
void | virtualWrite (int pin, const T &data) |
Sends value to a Virtual Pin. | |
void | virtualWriteBinary (int pin, const void *buff, size_t len) |
Sends buffer to a Virtual Pin. | |
void | virtualWrite (int pin, const BlynkParam ¶m) |
Sends BlynkParam to a Virtual Pin. | |
void | syncAll () |
Requests Server to re-send current values for all widgets. | |
void | syncVirtual (int pin) |
Requests App or Server to re-send current value of a Virtual Pin. | |
template<typename T > | |
void | tweet (const T &msg) |
Tweets a message. | |
template<typename T > | |
void | notify (const T &msg) |
Sends a push notification to the App. | |
template<typename T > | |
void | sms (const T &msg) |
Sends an SMS. | |
template<typename T1 , typename T2 > | |
void | email (const char *email, const T1 &subject, const T2 &msg) |
Sends an email message. | |
void | refresh (int pin) |
Refreshes value of a widget by running user-defined BLYNK_READ handler of a pin. | |
void | delay (unsigned long ms) |
Delays for N milliseconds, handling server communication in background. |
Detailed Description
template<class Proto>
class BlynkApi< Proto >
Represents high-level functions of Blynk.
Definition at line 24 of file BlynkApi.h.
Member Function Documentation
bool connect | ( | unsigned long | timeout = BLYNK_TIMEOUT_MS *3 ) |
Connects to the server.
Blocks until connected or timeout happens. May take less or more then timeout value.
- Parameters:
-
timeout Connection timeout
- Returns:
- True if connected to the server
bool connected | ( | ) |
- Returns:
- True if connected to the server
void delay | ( | unsigned long | ms ) |
Delays for N milliseconds, handling server communication in background.
- Warning:
- Should be used very carefully, especially on platforms with small RAM.
- Parameters:
-
ms Milliseconds to wait
Definition at line 246 of file BlynkApi.h.
void disconnect | ( | ) |
Disconnects from the server.
It will not try to reconnect, until connect() is called
void email | ( | const char * | email, |
const T1 & | subject, | ||
const T2 & | msg | ||
) |
Sends an email message.
- Parameters:
-
email Email to send to subject Subject of message msg Text of the message
Definition at line 210 of file BlynkApi.h.
void notify | ( | const T & | msg ) |
Sends a push notification to the App.
- Parameters:
-
msg Text of the message
Definition at line 182 of file BlynkApi.h.
void refresh | ( | int | pin ) |
Refreshes value of a widget by running user-defined BLYNK_READ handler of a pin.
- Parameters:
-
pin Virtual Pin number
Definition at line 231 of file BlynkApi.h.
bool run | ( | bool | available = false ) |
Performs Blynk-related housekeeping and processes incoming commands.
- Parameters:
-
available True if there is incoming data to process Only used when user manages connection manually.
void sms | ( | const T & | msg ) |
void syncAll | ( | ) |
Requests Server to re-send current values for all widgets.
Definition at line 145 of file BlynkApi.h.
void syncVirtual | ( | int | pin ) |
Requests App or Server to re-send current value of a Virtual Pin.
This will probably cause user-defined BLYNK_WRITE handler to be called.
- Parameters:
-
pin Virtual Pin number
Definition at line 155 of file BlynkApi.h.
void tweet | ( | const T & | msg ) |
void virtualWrite | ( | int | pin, |
const T & | data | ||
) |
Sends value to a Virtual Pin.
- Parameters:
-
pin Virtual Pin number data Value to be sent
Definition at line 72 of file BlynkApi.h.
void virtualWrite | ( | int | pin, |
const BlynkParam & | param | ||
) |
Sends BlynkParam to a Virtual Pin.
- Parameters:
-
pin Virtual Pin number param
Definition at line 138 of file BlynkApi.h.
void virtualWriteBinary | ( | int | pin, |
const void * | buff, | ||
size_t | len | ||
) |
Sends buffer to a Virtual Pin.
- Parameters:
-
pin Virtual Pin number buff Data buffer len Length of data
Definition at line 124 of file BlynkApi.h.
Generated on Fri Jul 15 2022 06:04:58 by 1.7.2