#include <Print.h>
Go to the source code of this file.
|
void | initInternalLed () |
| Initialize the internal LED. More...
|
|
void | blinkInternalLed (int onTime, int offTime) |
| Blink the internal LED of the board. More...
|
|
void | showBoardType (Print &pr=Serial) |
| Show the board name. More...
|
|
bool | initWiFi (const char *ssid, const char *password, const bool resetIfNoWiFi=true, const bool blinkInternal=false, const char *hostName=NULL, Print &pr=Serial) |
| Initialize the WiFi. More...
|
|
bool | initWiFi (PtrWiFiMultiEntry creds, int sizeOfCreds, const bool resetIfNoWiFi=true, const bool blinkInternal=false, const char *hostName=NULL, Print &pr=Serial) |
| Initialize the WiFi. More...
|
|
◆ BOARD_FAMILY
#define BOARD_FAMILY "Unknown" |
◆ BOARD_NAME
#define BOARD_NAME "Unknown" |
◆ BOARD_TYPE_6
◆ internalLedOff
Turn inboard LED OFF.
Utility macro to turn OFF the internal LED of the board.
◆ internalLedOn
Turn inboard LED ON.
Utility macro to turn ON the internal LED of the board.
◆ LED_INTERNAL_PIN
#define LED_INTERNAL_PIN 1 |
◆ PtrWiFiMultiEntry
◆ WiFiMulti
◆ blinkInternalLed()
void blinkInternalLed |
( |
int |
onTime, |
|
|
int |
offTime |
|
) |
| |
Blink the internal LED of the board.
Function to blink the internal LED of the board. Internally uses the delay(...)
function.
- Parameters
-
onTime | the amount of time to maintain the internal LED ON |
offTime | the amount of time to maintain the internal LED OFF |
◆ initInternalLed()
Initialize the internal LED.
This function configures the pin associatied with the internal LED to a digital output and turns off the internal LED.
◆ initWiFi() [1/2]
bool initWiFi |
( |
const char * |
ssid, |
|
|
const char * |
password, |
|
|
const bool |
resetIfNoWiFi = true , |
|
|
const bool |
blinkInternal = false , |
|
|
const char * |
hostName = NULL , |
|
|
Print & |
pr = Serial |
|
) |
| |
Initialize the WiFi.
Function to initialize the WiFi component of the board in station mode (WIFI_STA
).
Beasides the authentication credentials (name of the SSID and corresponding password) this function accepts a set of aditional arguments that can be used to:
-
Reset the board if no connection could be established.
-
Blink the internal LED while wainting for the establishment of the WiFi connection.
-
Set the DNS host name of the board.
-
Specify a
Print
object to show debug messages.
- Parameters
-
ssid | name of the network |
password | the matching password for the specified SSID |
resetIfNoWiFi | boolean flag that can be used to reset the board if no connection could be done within 30 seconds. This is the default behavior |
blinkInternal | boolean flag that can be used to controll the blinking of the interal LED while waiting for the establishment of the WiFi connection. The default behavior is to not blink the internal LED |
hostName | DNS name of the board. By default the DNS name is not set. |
pr | Arduino Print object that suports the print and println methods. By default these messages are shown in the default Serial port |
- Returns
true
if it was possible to connect the the specified network. In case of failure, if the flag resetIfNoWiFi
is set to true
the board is reset, else the value false
is returned.
◆ initWiFi() [2/2]
bool initWiFi |
( |
PtrWiFiMultiEntry |
creds, |
|
|
int |
sizeOfCreds, |
|
|
const bool |
resetIfNoWiFi = true , |
|
|
const bool |
blinkInternal = false , |
|
|
const char * |
hostName = NULL , |
|
|
Print & |
pr = Serial |
|
) |
| |
Initialize the WiFi.
Function to initialize the WiFi component of the board in station mode (WIFI_STA
).
This function receives a set of authentication credentials (name of the SSID and corresponding password). Thus board tries to establish a connection with every networs in the list until establish a connection.
This function also accepts a set of aditional arguments that can be used to:
-
Reset the board if no connection could be established.
-
Blink the internal LED while wainting for the establishment of the WiFi connection.
-
Set the DNS host name of the board.
-
Specify a
Print
object to show debug messages.
- Parameters
-
creds | set of authentication credentials |
sizeOfCreds | number of authentication credentials |
resetIfNoWiFi | boolean flag that can be used to reset the board if no connection could be done within 30 seconds. This is the default behavior |
blinkInternal | boolean flag that can be used to controll the blinking of the interal LED while waiting for the establishment of the WiFi connection. The default behavior is to not blink the internal LED |
hostName | DNS name of the board. By default the DNS name is not set. |
pr | Arduino Print object that suports the print and println methods. By default these messages are shown in the default Serial port |
◆ showBoardType()
void showBoardType |
( |
Print & |
pr = Serial | ) |
|
Show the board name.
Utility function to show the name of the current board. By default the board name is printed to the default Serial
port.
- Parameters
-
pr | Arduino Print object that suports the print and println methods |