Datasheet
updateVbat();
if ( Feather.connected() )
{
// Update the RSSI value
int8_t rssi = Feather.RSSI();
oled.setRSSI(rssi);
// Get a light sample and publish to MQTT if available
#if SENSOR_TSL2561_ENABLED
if (_tslFound)
{
oled.clearMsgArea();
sensors_event_t event;
// Get a new data sample
bool sensor_data = tsl.getEvent(&event);
if (sensor_data)
{
if (AIO_ENABLED && aio.connected())
{
feedLUX = event.light;
oled.clearMsgArea();
oled.print("Lux -> AIO: ");
oled.println(event.light);
oled.display();
}
}
else
{
oled.clearMsgArea();
oled.println("Sensor failed");
oled.display();
Serial.println("Sensor failed");
}
}
#endif
}
else
{
// The connection was lost ... reset the status icons
oled.setConnected(false);
oled.setRSSI(0);
oled.setIPAddress(0);
oled.clearMsgArea();
}
oled.refreshIcons();
togglePin(BOARD_LED_PIN);
delay(10000);
}
© Adafruit Industries https://learn.adafruit.com/adafruit-oled-featherwing Page 29 of 32










