I2C 0.96" OLED display. More...
#include <sg_104030011_OLED96.hpp>


Public Types | |
| enum | ERegister { ERegister::kCommand = 0x80, ERegister::kData = 0x40 } |
| OLED96 registers. More... | |
| enum | E8BitCommand { E8BitCommand::kDisplayModeNormal = 0xa4, E8BitCommand::kDisplayModeAllOn = 0xa5, E8BitCommand::kDisplayModeAllOff = 0xa6, E8BitCommand::kDisplayModeInverse = 0xa7, E8BitCommand::kDisplayOff = 0xae, E8BitCommand::kDisplayOn = 0xaf } |
Public Member Functions | |
| virtual | ~OLED96 (void) |
| Destructor. More... | |
| OLED96 (const uint8_t addr, const std::string &n="") | |
| Constructor requires the I2C address to use. More... | |
| OLED96 & | reset (void) |
| Reset the OLED96 configuration. More... | |
| OLED96 & | cmd_set_display_mode (const uint8_t mode) |
| Set the display mode. More... | |
| virtual bool | is_grove_uart (void) const |
| Determine if this is a Grove UART device. More... | |
| virtual bool | is_grove_i2c (void) const |
| Determine if this is a Grove I2C device. More... | |
| virtual bool | is_grove_gpio (void) const |
| Determine if this is a Grove GPIO device. More... | |
| virtual uint32_t | get_sku (void) const |
| Return a guess as to the Seeed SKU number based on the grove type. More... | |
| virtual std::string | get_type_name (void) const |
| Return a short text string representing the grove type. More... | |
| virtual EGroveType | get_type (void) const |
| Return the grove type. More... | |
| virtual std::string | get_name (void) const |
| Return the user-supplied name. More... | |
| virtual std::string | get_description (void) const |
| Return a multi-word 1-line description of this object. More... | |
| bool | operator== (const OLED96 &rhs) const |
| Test object equality. More... | |
| bool | operator!= (const OLED96 &rhs) const |
| Test object equality. More... | |
| bool | operator== (const GroveBase &rhs) const |
| Test object equality. More... | |
| bool | operator!= (const GroveBase &rhs) const |
| Test object equality. More... | |
Static Public Member Functions | |
| static bool | auto_detect (void) |
| Tries to detect if a OLED 96*96 is connected to I2C. More... | |
Public Attributes | |
| uint8_t | i2c_address |
| I2C address. More... | |
| int | i2c_file_handle |
File handle to /dev/i2c-1. More... | |
| EGroveType | grove_type |
| std::string | grove_name |
I2C 0.96" OLED display.
Connect the OLED display to the left-hand-side I2C interface. The I2C address for this I2C device is 0x3c.
| Description | Image |
|---|---|
I2C ADC with a default address of 0x50. |
|
I2C ADC with a temperature sensor.J1 connects to the BeagleBone Green, and J2 connects to the analog I2C twig. |
|
|
strong |
|
strong |
|
virtual |
Destructor.
| SG::OLED96::OLED96 | ( | const uint8_t | addr, |
| const std::string & | n = "" |
||
| ) |
Constructor requires the I2C address to use.
| std::system_error | if the I2C device cannot be opened. |
| std::system_error | if the I2C slave address cannot be set. |
References i2c_address, i2c_file_handle, and SG::kI2CADC.
|
static |
Tries to detect if a OLED 96*96 is connected to I2C.
true if it is possible that a OLED 96x96 is connected to the I2C bus. false if it seems as if the I2C bus isn't connected to a OLED 96x96.| OLED96& SG::OLED96::cmd_set_display_mode | ( | const uint8_t | mode | ) |
Set the display mode.
|
virtualinherited |
Return a multi-word 1-line description of this object.
References SG::demangle(), and SG::BeagleBone::to_string().
Referenced by buzzer(), chainable_rgb_led(), and temperature().


|
inlinevirtualinherited |
Return the user-supplied name.
References SG::GroveBase::grove_name.
Referenced by SG::GroveBase::operator=(), and SG::GroveBase::operator==().

|
inlinevirtualinherited |
Return a guess as to the Seeed SKU number based on the grove type.
References SG::get_sku_from_grove_type().

|
inlinevirtualinherited |
Return the grove type.
References SG::GroveBase::grove_type.
Referenced by SG::GroveBase::operator=(), and SG::GroveBase::operator==().

|
inlinevirtualinherited |
Return a short text string representing the grove type.
References SG::to_string().

|
inlinevirtualinherited |
|
inlinevirtualinherited |
|
inlinevirtualinherited |
|
inlineinherited |
Test object equality.
References SG::GroveBase::operator==().

|
inline |
|
inherited |
Test object equality.
References SG::GroveBase::get_name(), and SG::GroveBase::get_type().
Referenced by SG::GroveBase::operator!=(), SG::Buzzer::operator==(), SG::TemperatureAndHumiditySensor::operator==(), SG::TemperatureSensor::operator==(), SG::ChainableRGBLED::operator==(), and SG::I2CADC::operator==().


| bool SG::OLED96::operator== | ( | const OLED96 & | rhs | ) | const |
|
inherited |
Referenced by SG::GroveBase::get_name().
|
inherited |
Referenced by SG::GroveBase::get_type().
| uint8_t SG::OLED96::i2c_address |
I2C address.
Referenced by OLED96().
| int SG::OLED96::i2c_file_handle |
File handle to /dev/i2c-1.
Referenced by OLED96().