|
50 | 50 | #define Rw B00000010 // Read/Write bit
|
51 | 51 | #define Rs B00000001 // Register select bit
|
52 | 52 |
|
| 53 | +/** |
| 54 | + * This is the driver for the Liquid Crystal LCD displays that use the I2C bus. |
| 55 | + * |
| 56 | + * After creating an instance of this class, first call begin() before anything else. |
| 57 | + * The backlight is on by default, since that is the most likely operating mode in |
| 58 | + * most cases. |
| 59 | + */ |
53 | 60 | class LiquidCrystal_I2C : public Print {
|
54 | 61 | public:
|
| 62 | + /** |
| 63 | + * Constructor |
| 64 | + * |
| 65 | + * @param lcd_addr I2C slave address of the LCD display. Most likely printed on the |
| 66 | + * LCD circuit board, or look in the supplied LCD documentation. |
| 67 | + * @param lcd_cols Number of columns your LCD display has. |
| 68 | + * @param lcd_rows Number of rows your LCD display has. |
| 69 | + * @param charsize The size in dots that the display has, use LCD_5x10DOTS or LCD_5x8DOTS. |
| 70 | + */ |
55 | 71 | LiquidCrystal_I2C(uint8_t lcd_addr, uint8_t lcd_cols, uint8_t lcd_rows, uint8_t charsize = LCD_5x8DOTS);
|
| 72 | + |
| 73 | + /** |
| 74 | + * Set the LCD display in the correct begin state, must be called before anything else is done. |
| 75 | + */ |
56 | 76 | void begin();
|
| 77 | + |
| 78 | + /** |
| 79 | + * Remove all the characters currently shown. Next print/write operation will start |
| 80 | + * from the first position on LCD display. |
| 81 | + */ |
57 | 82 | void clear();
|
| 83 | + |
| 84 | + /** |
| 85 | + * Next print/write operation will will start from the first position on the LCD display. |
| 86 | + */ |
58 | 87 | void home();
|
| 88 | + |
| 89 | + /** |
| 90 | + * Do not show any characters on the LCD display. Backlight state will remain unchanged. |
| 91 | + * Also all characters written on the display will return, when the display in enabled again. |
| 92 | + */ |
59 | 93 | void noDisplay();
|
| 94 | + |
| 95 | + /** |
| 96 | + * Show the characters on the LCD display, this is the normal behaviour. This method should |
| 97 | + * only be used after noDisplay() has been used. |
| 98 | + */ |
60 | 99 | void display();
|
| 100 | + |
| 101 | + /** |
| 102 | + * Do not blink the cursor indicator. |
| 103 | + */ |
61 | 104 | void noBlink();
|
62 |
| - void blink(); |
| 105 | + |
| 106 | + /** |
| 107 | + * Start blinking the cursor indicator. |
| 108 | + */ |
| 109 | + void blink(); |
| 110 | + |
| 111 | + /** |
| 112 | + * Do not show a cursor indicator. |
| 113 | + */ |
63 | 114 | void noCursor();
|
| 115 | + |
| 116 | + /** |
| 117 | + * Show a cursor indicator, cursor can blink on not blink. Use the |
| 118 | + * methods blink() and noBlink() for changing cursor blink. |
| 119 | + */ |
64 | 120 | void cursor();
|
| 121 | + |
65 | 122 | void scrollDisplayLeft();
|
66 | 123 | void scrollDisplayRight();
|
67 | 124 | void printLeft();
|
|
0 commit comments