Datasheet
oled.clearMsgArea();
}
else
{
// Display the error message
err_t err = Feather.errno();
oled.setConnected(false);
oled.refreshIcons();
oled.clearMsgArea();
oled.println("Connection Error:");
switch (err)
{
case ERROR_WWD_ACCESS_POINT_NOT_FOUND:
// SSID wasn't found when scanning for APs
oled.println("Invalid SSID");
break;
case ERROR_WWD_INVALID_KEY:
// Invalid SSID passkey
oled.println("Invalid Password");
break;
default:
// The most likely cause of errors at this point is that
// you are just out of the device/AP operating range
oled.print(Feather.errno());
oled.print(":");
oled.println(Feather.errstr());
oled.refreshIcons(); // Refresh icons in case the text ran over
break;
}
oled.display();
// Return false to indicate that we received an error (available in feather.errno)
return false;
}
return true;
}
/**************************************************************************/
/*!
@brief
*/
/**************************************************************************/
void updateVbat()
{
int vbatADC = 0; // The raw ADC value off the voltage div
float vbatFloat = 0.0F; // The ADC equivalent in millivolts
float vbatLSB = 0.80566F; // mV per LSB
// Read the analog in value:
vbatADC = analogRead(VBAT_PIN);
vbatADC = analogRead(VBAT_PIN);
© Adafruit Industries https://learn.adafruit.com/adafruit-oled-featherwing Page 26 of 32










