Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 Aug 28 2022 15:56:37 by
1.7.2