Client mode functions

wifi.setMode(mode)
Sets the connection mode of the WIFI-module

0 = Client mode (The board connects to an existing WIFI-network)
1 = Access Point mode (WIFI devices are able to connect to the board)
2 = Client & Access Point mode
3 = Flash mode

Example:
This code sets the module to Client&AP mode


wifi.setMode(2); //Set to Client&AP mode

wifi.list()
Returns a list of found WIFI-networks as String

Example:
This code sets the module to Client mode and prints found WIFI-Networks to USB-Terminal


#include "wino.h"

void setup() {
wifi.on();
wifi.setMode(0); //Set to client mode
SerialUSB.begin(115200);
}

void loop() {
delay(10000);
    SerialUSB.println(wifi.list());
}

wifi.join(ssid, password)
Connects to a WIFI-network

Example:
This code waits until the Module is connected to WIFI and prints process to USB-Terminal


#include "wino.h"

void setup() {
wifi.on();
wifi.setMode(0);
SerialUSB.begin(115200);
  while (!wifi.join("MyWifiNetwork","12345")) {   //please adjust name and password
    SerialUSB.println("connecting to WIFI...");
    delay(5000);
  }
  SerialUSB.println("connected to WIFI");
}

void loop() {

}

wifi.leave()
Disconnects from any WIFI-network

Example:
This code disconnects from WIFI network


wifi.leave();

wifi.getip()
Returns the current IP-address of the Client as String

Example:
This code waits until the Module is connected to WIFI and prints IP-Address to USB-Terminal


#include "wino.h"

void setup() {
wifi.on();
wifi.setMode(0);
SerialUSB.begin(115200);
wifi.join("MyWifiNetwork","12345"))   //please adjust name and password
}

void loop() {
delay(2000);
SerialUSB.println(wifi.getip());
}