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

Adafruit FeatherOLED SH110X H. More...

#include <Adafruit_FeatherOLED_SH110X.h>

Inheritance diagram for Adafruit_FeatherOLED_SH110X:
Adafruit_FeatherOLED_SH110X_WiFi

Public Types

enum  BatteryIconType { FOLED_BATTERYICON_NONE = 0, FOLED_BATTERYICON_THREEBAR = 1 }
 

Public Member Functions

 Adafruit_FeatherOLED_SH110X (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 SH110X H.

Class that extends the SH110X 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_SH110X()

Adafruit_FeatherOLED_SH110X::Adafruit_FeatherOLED_SH110X ( 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_SH110X::setBattery ( float  vbat)
inline

Sets the Battery Value.

Parameters
vbatThe Battery Voltage

◆ setBatteryVisible()

void Adafruit_FeatherOLED_SH110X::setBatteryVisible ( bool  enable)
inline

Sets the Battery Value Visibility.

Parameters
enableIs visibility enabled?

◆ setBatteryIcon()

void Adafruit_FeatherOLED_SH110X::setBatteryIcon ( bool  enable)
inline

Sets the Battery Icon Visibility.

Parameters
enableIs visibility enabled?

◆ getBatteryVoltage()

float Adafruit_FeatherOLED_SH110X::getBatteryVoltage ( )

Query the Feather for the Lipoly battery voltage.

Returns
The battery voltage in volts

◆ clearMsgArea()

void Adafruit_FeatherOLED_SH110X::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_SH110X::_battery
protected

Battery Value

◆ _batteryIcon

bool Adafruit_FeatherOLED_SH110X::_batteryIcon
protected

Display Battery Icon

◆ _batteryVisible

bool Adafruit_FeatherOLED_SH110X::_batteryVisible
protected

Battery Info Visible


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