SO1602A Lib. SO1602A is Organic LED, has 16 chars and 2 lines. This lib supports printf() of C-Language. http://akizukidenshi.com/catalog/g/gP-08276/
Dependents: NEW_LineTraceHub NEW_LineTraceHub_2 ColorSensorTest
Diff: SO1602A.h
- Revision:
- 1:eef15a16fe7a
- Parent:
- 0:d8b95544d238
- Child:
- 3:eaaedd09fa6b
--- a/SO1602A.h Tue Sep 08 08:35:42 2015 +0000 +++ b/SO1602A.h Wed Sep 09 00:04:00 2015 +0000 @@ -1,3 +1,16 @@ +/** SO1602A is Organic-LED, and has 16 chars/line and 2 lines. + * This librarry supports "printf()" C format. + * + * EX. code. + * + * I2C i2c(p9, p10); + * SO1602A oled(i2c); // if SA0 is Low. Otherwise, oled(i2c, 0x7a); + * // SO1602A oled(p9, p10); + * oled.setContrast(0xff); + * oled.setDispFlag(true, true, false); + * oled.printf("test:%d,%f", i, 3.14); + */ + #pragma once #include "mbed.h" @@ -29,6 +42,11 @@ * @param val; 256steps, 0x00 ~ 0xff. Contrast increas as the value. */ void setContrast(char val); + + /** Set Display flag. + * @parm Enable Display, Cursor turned on, Cursor Blink. + */ + void setDispFlag(bool disp, bool cursor, bool blink); private: I2C i2c;