User Manual

// Connected: Print network info
Feather.printNetwork();
// Tell the HTTP client to auto print error codes and halt on errors
httpserver.err_actions(true, true);
// Configure HTTP Server Pages
Serial.println("Adding Pages to HTTP Server");
httpserver.addPages(pages, pagecount);
Serial.print("Starting HTTP Server ... ");
httpserver.begin(PORT, MAX_CLIENTS);
Serial.println(" running");
}
/**************************************************************************/
/*!
@brief The loop function runs over and over again
*/
/**************************************************************************/
void loop()
{
togglePin(ledPin);
delay(1000);
}
/**************************************************************************/
/*!
@brief Connect to the defined access point (AP)
*/
/**************************************************************************/
bool connectAP(void)
{
// Attempt to connect to an AP
Serial.print("Please wait while connecting to: '" WLAN_SSID "' ... ");
if ( Feather.connect(WLAN_SSID, WLAN_PASS) )
{
Serial.println("Connected!");
}
else
{
Serial.printf("Failed! %s (%d)", Feather.errstr(), Feather.errno());
Serial.println();
}
Serial.println();
return Feather.connected();
}
/**************************************************************************/
/*!
@brief TCP/HTTP disconnect callback
*/
/**************************************************************************/
void disconnect_callback(void)
{
Serial.println();
Serial.println("---------------------");
© Adafruit Industries https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi Page 107 of 202