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
SO1602A Class Reference
SO1602A is Organic-LED, and has 16 chars/line and 2 lines. More...
#include <SO1602A.h>
Public Member Functions | |
void | init () |
Initialize. | |
void | clear () |
Clear Display. | |
void | locate (int col, int row) |
Set Position of char. | |
void | setContrast (char val) |
Set Contrast. | |
void | setDispFlag (bool disp=true, bool cursor=true, bool blink=true) |
Set Display flag. |
Detailed Description
SO1602A is Organic-LED, and has 16 chars/line and 2 lines.
This librarry supports "printf()" C format.
#include "mbed.h" #include "SO1602A.h" I2C i2c(p28, p27); SO1602A oled(i2c); DigitalOut led[]= {LED1, LED2, LED3, LED4}; int main() { oled.init(); int iter= 0; while(true) { led[0] = !led[0]; oled.printf("iter: %5.5d.", iter); wait(1.0f); if(iter%10 == 0) // 10s oled.clear(); iter++; } }
Definition at line 35 of file SO1602A.h.
Member Function Documentation
void clear | ( | ) |
Clear Display.
Definition at line 113 of file SO1602A.cpp.
void init | ( | ) |
Initialize.
Definition at line 68 of file SO1602A.cpp.
void locate | ( | int | col, |
int | row | ||
) |
Set Position of char.
- Parameters:
-
col,: column, row: rows.
Definition at line 60 of file SO1602A.cpp.
void setContrast | ( | char | val ) |
Set Contrast.
- Parameters:
-
val; 256steps, 0x00 ~ 0xff. Contrast increas as the value.
Definition at line 83 of file SO1602A.cpp.
void setDispFlag | ( | bool | disp = true , |
bool | cursor = true , |
||
bool | blink = true |
||
) |
Set Display flag.
Enable Display, Cursor turned on, Cursor Blink.
Definition at line 97 of file SO1602A.cpp.
Generated on Sun Jul 17 2022 01:40:33 by 1.7.2