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.
Dependents: mbed_nicovideo_search_api mbed_recent_nicovideo_display_pub
GraphicOLED Class Reference
GraphicOLED interface for WS0010. More...
#include <GraphicOLED.h>
Public Member Functions | |
| GraphicOLED (PinName rs, PinName e, PinName d4, PinName d5, PinName d6, PinName d7) | |
| Create a GraphicOLED interface. | |
| int | putc (int c) |
| Write a character to the OLED. | |
| int | printf (const char *format,...) |
| Write a formated string to the OLED. | |
| void | locate (int column, int row) |
| Locate to a screen column and row. | |
| void | cls () |
| Clear the screen and locate to 0,0. | |
Detailed Description
GraphicOLED interface for WS0010.
Currently support UTF-8 KANJI(misaki font)
#include "mbed.h" #include "GraphicOLED.h" GraphicOLED oled(p24, p26, p27, p28, p29, p30); // rs, e, d4-d7 int main() { oled.printf("Hello World!\n"); }
Definition at line 20 of file GraphicOLED.h.
Constructor & Destructor Documentation
| GraphicOLED | ( | PinName | rs, |
| PinName | e, | ||
| PinName | d4, | ||
| PinName | d5, | ||
| PinName | d6, | ||
| PinName | d7 | ||
| ) |
Create a GraphicOLED interface.
- Parameters:
-
rs Instruction/data control line e Enable line (clock) d4-d7 Data lines for using as a 4-bit interface
Definition at line 7 of file GraphicOLED.cpp.
Member Function Documentation
| void cls | ( | ) |
Clear the screen and locate to 0,0.
Definition at line 59 of file GraphicOLED.cpp.
| void locate | ( | int | column, |
| int | row | ||
| ) |
Locate to a screen column and row.
- Parameters:
-
column The horizontal position from the left, indexed from 0 row The vertical position from the top, indexed from 0
Definition at line 69 of file GraphicOLED.cpp.
| int printf | ( | const char * | format, |
| ... | |||
| ) |
Write a formated string to the OLED.
- Parameters:
-
format A printf-style format string, followed by the variables to use in formating the string.
| int putc | ( | int | c ) |
Write a character to the OLED.
- Parameters:
-
c The character to write to the display
Generated on Wed Jul 13 2022 09:52:33 by
1.7.2