You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
607 B
37 lines
607 B
#include <Arduino.h>
|
|
#include <logging.h>
|
|
#include <uartWiFi.h>
|
|
|
|
#define LOG_LEVEL LOG_LEVEL_DEBUG
|
|
|
|
UARTWifi uartWifi;
|
|
|
|
bool isConnectedAP = false;
|
|
|
|
/**
|
|
* Connect to AP
|
|
* Parameters
|
|
* ssid : char* - AP SSID
|
|
* password : char* - AP Password
|
|
*/
|
|
void connectAP(const char* ssid, const char* password) {
|
|
if (!isConnectedAP) {
|
|
isConnectedAP = uartWifi.connectAP(ssid, password);
|
|
}
|
|
}
|
|
|
|
void setup() {
|
|
Serial.begin(9600);
|
|
uartWifi.begin();
|
|
}
|
|
|
|
void loop() {
|
|
LogInfo("Hello World");
|
|
|
|
connectAP("Iphone Yohann", "12345678");
|
|
|
|
WIFI_MODE wifiMode = uartWifi.getWiFiMode();
|
|
|
|
delay(1000);
|
|
}
|