Arduino library for segment LCD displays. Provides abstract interface, controller drivers (PCF85176/HT1621/HT1622/VK0192), and implementations for common displays.
#include "SegLCD_HT1621_4SegDegree.h"
SegTransport3WireArduino transport(6, 5); // DATA, WR pins
SegLCD_HT1621_4SegDegree lcd(transport, 7); // CS pin
void setup() {
lcd.init();
}
void loop() {
lcd.setCursor(0, 0);
lcd.print(25); // Display: 25
delay(1000);
}- Getting Started: Installation, first project, LCD selection
- Supported LCDs: Complete catalog with pinout and examples
- Architecture: Class hierarchy and design patterns
- Controllers: Protocol details (I2C, 3-wire serial)
- Adding New LCD: Tutorial for custom displays
- API Reference: Full Doxygen documentation
| Controller | Protocol | Pins | Max Digits |
|---|---|---|---|
| PCF85176 | I2C | 2 | 13 |
| PCF8576 | I2C | 2 | 13 |
| HT1621 | 3-wire | 3 | 6 |
| HT1622 | 3-wire | 3 | 10+ |
| VK0192 | 3-wire | 3 | 5 |
See Supported LCDs for full catalog.
| Display | Controller | Features |
|---|---|---|
| Temperature/Humidity | PCF85176 | 6-digit, icons |
| 6-Digit Signal/Battery | PCF85176 | Signal bars, battery, progress |
| 2x4-Digit Sig/Bat/Power | PCF85176 | 2 rows, signal, battery, power |
| 4-Digit with Degree | HT1621 | Colon, degree symbol |
| 6-Digit with Battery | HT1621 | Battery indicator |
| LCM0844 | HT1621 | 8 digits, labels, battery/load |
| LCM88128 | HT1621 | 8 digits, labels, battery/load/PV |
| LCM59011 | HT1621 | 4 digits, colon, wifi, battery, symbols |
| 10-Digit 16-Segment | HT1622 | Enhanced segments |
| 5-Digit Signal/Battery | VK0192 | Advanced controller |
Versions 0.0.x are preview releases. API and behavior may still change, including breaking changes, without a major or minor version bump.
- Sketch → Include Library → Manage Libraries
- Search
SegLCDLib - Click Install
- Download: https://github.com/petrkr/SegLCDLib
- Copy to
Arduino/libraries/SegLCDLib - Restart Arduino IDE
17 complete examples in examples/ directory:
- PCF85176: 7 examples (RawLCD, TempHum, 2Row4DigSigBatPwr, etc.)
- HT1621: 6 examples (4DigDeg, 6DigBat, LCM0844, LCM59011, LCM88128, RawLCD)
- HT1622: 2 examples (10Digit16Segment, RawLCD)
- VK0192: 1 example (5DigSigBatProg)
- PCF8576: 1 example (4Seg6SegMaintSegBatUnits)
- Abstract Interface: Consistent LCD API 1.0 (Arduino LCD standard)
- Multiple Protocols: I2C (PCF85176) and 3-wire serial (HT1621/1622/VK0192)
- RAM Efficient: Buffered writes, minimal memory overhead
- Print Compatibility: Inherits from
Printclass forprint()/println() - Flexible: Easy to add support for new displays
Application Code
↓
SegLCDLib Base (LCD API 1.0)
↓
Controller Driver (PCF85176, HT1621, etc.)
↓
LCD Implementation (display-specific)
↓
Hardware (I2C / 3-wire serial)
See Architecture for details.
- Issues: https://github.com/petrkr/SegLCDLib/issues
- Documentation: https://petrkr.github.io/SegLCDLib/
- Reference: https://playground.arduino.cc/Code/LCDAPI/