Adafruit Feather OLED
Public Types | Public Member Functions | Protected Attributes | List of all members
Adafruit_FeatherOLED Class Reference

Adafruit FeatherOLED H. More...

#include <Adafruit_FeatherOLED.h>

Inheritance diagram for Adafruit_FeatherOLED:
Adafruit_FeatherOLED_WiFi

Public Types

enum  BatteryIconType { FOLED_BATTERYICON_NONE = 0, FOLED_BATTERYICON_THREEBAR = 1 }
 

Public Member Functions

 Adafruit_FeatherOLED (TwoWire *wire=&Wire, int reset=-1)
 Class Constructor. More...
 
void setBattery (float vbat)
 Sets the Battery Value. More...
 
void setBatteryVisible (bool enable)
 Sets the Battery Value Visibility. More...
 
void setBatteryIcon (bool enable)
 Sets the Battery Icon Visibility. More...
 
float getBatteryVoltage ()
 Query the Feather for the Lipoly battery voltage. More...
 
void init (void)
 Initialises the display (always call this first!)
 
void clearMsgArea (bool update=true)
 Clears the message area (the middle 128x16 pixels) and sets the cursor to 0, 8. More...
 
void renderBattery (void)
 Renders the battery icon.
 

Protected Attributes

float _battery
 
bool _batteryIcon
 
bool _batteryVisible
 

Detailed Description

Adafruit FeatherOLED H.

Class that extends the SSD1306 to allow easy usage such as displaying the battery

Member Enumeration Documentation

◆ BatteryIconType

The Battery Icon Types

Enumerator
FOLED_BATTERYICON_NONE 

Displays volts

FOLED_BATTERYICON_THREEBAR 

Displays a 3-bar icon

Constructor & Destructor Documentation

◆ Adafruit_FeatherOLED()

Adafruit_FeatherOLED::Adafruit_FeatherOLED ( TwoWire *  wire = &Wire,
int  reset = -1 
)
inline

Class Constructor.

Parameters
wireThe Wire object
resetPerform a Reset on initialization

Member Function Documentation

◆ setBattery()

void Adafruit_FeatherOLED::setBattery ( float  vbat)
inline

Sets the Battery Value.

Parameters
vbatThe Battery Voltage

◆ setBatteryVisible()

void Adafruit_FeatherOLED::setBatteryVisible ( bool  enable)
inline

Sets the Battery Value Visibility.

Parameters
enableIs visibility enabled?

◆ setBatteryIcon()

void Adafruit_FeatherOLED::setBatteryIcon ( bool  enable)
inline

Sets the Battery Icon Visibility.

Parameters
enableIs visibility enabled?

◆ getBatteryVoltage()

float Adafruit_FeatherOLED::getBatteryVoltage ( )

Query the Feather for the Lipoly battery voltage.

Returns
The battery voltage in volts

◆ clearMsgArea()

void Adafruit_FeatherOLED::clearMsgArea ( bool  update = true)

Clears the message area (the middle 128x16 pixels) and sets the cursor to 0, 8.

Parameters
updateAutomatically update the display after clearing

Member Data Documentation

◆ _battery

float Adafruit_FeatherOLED::_battery
protected

Battery Value

◆ _batteryIcon

bool Adafruit_FeatherOLED::_batteryIcon
protected

Display Battery Icon

◆ _batteryVisible

bool Adafruit_FeatherOLED::_batteryVisible
protected

Battery Info Visible


The documentation for this class was generated from the following files: