Adafruit Library
WipperSnapper_I2C_Driver_Out.h
Go to the documentation of this file.
1 
16 #ifndef WIPPERSNAPPER_I2C_DRIVER_OUT_H
17 #define WIPPERSNAPPER_I2C_DRIVER_OUT_H
18 
20 #include <Arduino.h>
21 
26 
27 public:
35  WipperSnapper_I2C_Driver_Out(TwoWire *i2c, uint16_t sensorAddress)
36  : WipperSnapper_I2C_Driver(i2c, sensorAddress) {
37  // No-op constructor
38  }
39 
44  // No-op destructor
45  }
46 
52  virtual void WriteMessage(const char *message) {
53  // noop
54  }
55 
68  virtual void ConfigureSSD1306(uint8_t width, uint8_t height,
69  uint8_t text_size, uint8_t rotation = 0) {
70  // noop
71  }
72 
78  virtual void WriteMessageSSD1306(const char *message) {
79  // noop
80  }
81 
89  virtual void ConfigureI2CBackpack(int32_t brightness, uint32_t alignment) {
90  // noop
91  }
92 
98  virtual void SetLedBackpackBrightness(uint8_t b) {
99  // noop
100  }
101 
107  void WriteLedBackpack(wippersnapper_i2c_v1_LEDBackpackWrite *msg_write) {
108  WriteMessage(msg_write->message);
109  }
110 
118  virtual void ConfigureCharLcd(uint32_t rows, uint32_t cols) {
119  // noop
120  }
121 
127  void EnableCharLcdBacklight(bool enable) {
128  // noop
129  }
130 
138  void WriteMessageCharLCD(wippersnapper_i2c_v1_CharLCDWrite *write_char_lcd,
139  bool enable_backlight = true) {
140  EnableCharLcdBacklight(enable_backlight);
141  WriteMessage(write_char_lcd->message);
142  }
143 };
144 
145 #endif // WIPPERSNAPPER_I2C_DRIVER_OUT_H
virtual void ConfigureCharLcd(uint32_t rows, uint32_t cols)
Configures a character LCD.
Definition: WipperSnapper_I2C_Driver_Out.h:118
virtual void WriteMessage(const char *message)
Writes a message to an i2c output device.
Definition: WipperSnapper_I2C_Driver_Out.h:52
Derived class for I2C output component drivers.
Definition: WipperSnapper_I2C_Driver_Out.h:25
Base class for I2C Drivers.
Definition: WipperSnapper_I2C_Driver.h:30
WipperSnapper_I2C_Driver_Out(TwoWire *i2c, uint16_t sensorAddress)
Creates a new I2C output component driver.
Definition: WipperSnapper_I2C_Driver_Out.h:35
virtual void WriteMessageSSD1306(const char *message)
Writes a message to the SSD1306 display.
Definition: WipperSnapper_I2C_Driver_Out.h:78
virtual void ConfigureI2CBackpack(int32_t brightness, uint32_t alignment)
Configures a LED backpack.
Definition: WipperSnapper_I2C_Driver_Out.h:89
void EnableCharLcdBacklight(bool enable)
Turns the character LCD backlight on or off.
Definition: WipperSnapper_I2C_Driver_Out.h:127
virtual ~WipperSnapper_I2C_Driver_Out()
Destructor for an I2C output component.
Definition: WipperSnapper_I2C_Driver_Out.h:43
virtual void ConfigureSSD1306(uint8_t width, uint8_t height, uint8_t text_size, uint8_t rotation=0)
Configures a SSD1306 OLED display. Must be called before driver begin()
Definition: WipperSnapper_I2C_Driver_Out.h:68
void WriteLedBackpack(wippersnapper_i2c_v1_LEDBackpackWrite *msg_write)
Writes a message to the LED backpack.
Definition: WipperSnapper_I2C_Driver_Out.h:107
virtual void SetLedBackpackBrightness(uint8_t b)
Sets the brightness of the LED backpack.
Definition: WipperSnapper_I2C_Driver_Out.h:98
void WriteMessageCharLCD(wippersnapper_i2c_v1_CharLCDWrite *write_char_lcd, bool enable_backlight=true)
Writes a message to the LCD.
Definition: WipperSnapper_I2C_Driver_Out.h:138