[I2C] [LCD] This is used to add support for OLED displays connected to the 'SoccerBoard'
More...
#include <eagle_LCD.h>
|
| LCD (SoccerBoard &soccerBoard, optVAL_t id=0x3C) |
| The constructor. More...
|
|
bool | changeID (optVAL_t newID=0x3C) |
| changes the address of the LCD display talked to More...
|
|
bool | clear (void) |
| clears the LCD More...
|
|
void | print (const char *data) |
| prints a string to the display More...
|
|
void | print (int data) |
| prints an integer to the display More...
|
|
void | print (optVAL_t line, optVAL_t col, const char *data) |
| prints a string to the display at a specific position More...
|
|
void | print (optVAL_t line, optVAL_t col, int data) |
| prints an integer to the display at a specific position More...
|
|
void | lightOn (void) |
| enable the backlight More...
|
|
void | lightOff (void) |
| disable the backlight More...
|
|
bool | reset (void) |
| clears the screen More...
|
|
bool | init (void) |
| initializes the Display called by: More...
|
|
void | drawBitmap (const unsigned char *bitmap, byte posX, byte posY, byte hiX, byte hiY) |
| draws a bitmap representet as an array of bytes More...
|
|
void | changeMode (bool newMode=true) |
| enable or disable the display More...
|
|
bool | setCursor (byte posX=0x0, byte posY=0x0) |
| set the position of the cursor More...
|
|
bool | changeBrightness (byte val=0x64) |
| changes the brightness of the display More...
|
|
void | changeBackground (bool newBackground=false) |
| changes the background of the display More...
|
|
|
void | s2Cmd (optVAL_t o, optVAL_t t) |
| this function will execute two cmd sends without starting and without ending the transmission More...
|
|
bool | s1Cmd (optVAL_t o) |
| this function will execute one cmd send without starting and without ending the transmission More...
|
|
void | s1Dat (optVAL_t o) |
| this function will execute one dat send without starting and without ending the transmission More...
|
|
[I2C] [LCD] This is used to add support for OLED displays connected to the 'SoccerBoard'
- Author
- EagleoutIce
LCD refers to the connected OLED display
- Copyright
- This code is based on the offical library [https://github.com/deloarts/OLED_I2C_128x64_Monochrome_Library] if you wan't to use this library in any official purpose, send a message to deloarts. cheers!
- Warning
- the usage of the LCD will need many Space due to the fact that font is handled by arduino
- Precondition
- to use this class:
#define EBOARD_I2C 0x1 //do you think this is obsolete ? tell me :D
#define EBOARD_LCD 0x1
[I2C] [LCD] You can use this class like this:
#define EBOARD_I2C 0x1
#define EBOARD_LCD 0x1
#include <eBoard.h>
}
- Note
- positions will only apply if both of them are smaller as the maximum declared with LCD_HEIGHT and LCD_WIDTH
-
init() will be called on the first display access! [Version 2.2b 🦍 - Optimize it [52m]]
Definition at line 203 of file eagle_LCD.h.
◆ LCD()
The constructor.
- Parameters
-
- Note
- if EBOARD_NANO is set to 0x1 this will only take one argument [the id]
◆ changeBackground()
void LCD::changeBackground |
( |
bool |
newBackground = false | ) |
|
changes the background of the display
- Parameters
-
newBackground | the new background of display
|
Referenced by main().
◆ changeBrightness()
bool LCD::changeBrightness |
( |
byte |
val = 0x64 | ) |
|
changes the brightness of the display
- Parameters
-
val | the new brightness of display |
- Returns
- true if the transmission was successful
-
false if there was one of the following errors:
- buffer overflow
- NACK on address
- NACK on data
- unknown error
◆ changeID()
bool LCD::changeID |
( |
optVAL_t |
newID = 0x3C | ) |
|
changes the address of the LCD display talked to
- Parameters
-
newID | the target ID of the LCD |
- Note
- this calls LCD::init() by default!
- Returns
- true if the transmission was successful
-
false if there was one of the following errors:
- buffer overflow
- NACK on address
- NACK on data
- unknown error
◆ changeMode()
void LCD::changeMode |
( |
bool |
newMode = true | ) |
|
enable or disable the display
- Parameters
-
newMode | the mode the Display should have now
- true: enabled
- false: disabled
|
◆ clear()
clears the LCD
- Returns
- true if the transmission was successful
-
false if there was one of the following errors:
- buffer overflow
- NACK on address
- NACK on data
- unknown error
Referenced by main().
◆ drawBitmap()
void LCD::drawBitmap |
( |
const unsigned char * |
bitmap, |
|
|
byte |
posX, |
|
|
byte |
posY, |
|
|
byte |
hiX, |
|
|
byte |
hiY |
|
) |
| |
draws a bitmap representet as an array of bytes
- Parameters
-
bitmap | the array of bytes representing the bitmap to draw |
posX | the startPos abscissa |
posY | the startPos ordinate |
hiX | the width of the bitmap |
hiY | the height of the bitmap |
Referenced by main().
◆ init()
initializes the Display called by:
- Returns
- true if the transmission was successful
-
false if there was one of the following errors:
- buffer overflow
- NACK on address
- NACK on data
- unknown error
◆ lightOff()
void LCD::lightOff |
( |
void |
| ) |
|
|
inline |
disable the backlight
This is similar to:
◆ lightOn()
void LCD::lightOn |
( |
void |
| ) |
|
|
inline |
enable the backlight
This is similar with:
◆ print() [1/4]
void LCD::print |
( |
const char * |
data | ) |
|
prints a string to the display
- Parameters
-
Referenced by main().
◆ print() [2/4]
void LCD::print |
( |
int |
data | ) |
|
prints an integer to the display
- Parameters
-
◆ print() [3/4]
prints a string to the display at a specific position
- Parameters
-
line | the line to start at |
col | the col to start at |
data | the string to print |
◆ print() [4/4]
prints an integer to the display at a specific position
- Parameters
-
data | the integer to print [if you want to apply precision you'll have to do it manually there is no float write to save memory] |
line | the line to start at |
col | the col to start at |
◆ reset()
clears the screen
- Returns
- true if the transmission was successful
-
false if there was one of the following errors:
- buffer overflow
- NACK on address
- NACK on data
- unknown error
◆ s1Cmd()
this function will execute one cmd send without starting and without ending the transmission
- Parameters
-
- Returns
- true if the transmission was successful
-
false if there was one of the following errors:
- buffer overflow
- NACK on address
- NACK on data
- unknown error
◆ s1Dat()
this function will execute one dat send without starting and without ending the transmission
- Parameters
-
◆ s2Cmd()
this function will execute two cmd sends without starting and without ending the transmission
- Parameters
-
o | the first param |
t | the second param |
◆ setCursor()
bool LCD::setCursor |
( |
byte |
posX = 0x0 , |
|
|
byte |
posY = 0x0 |
|
) |
| |
set the position of the cursor
- Parameters
-
posX | the new position abscissa |
posY | the new position ordinate |
- Returns
- true if the transmission was successful
-
false if there was one of the following errors:
- buffer overflow
- NACK on address
- NACK on data
- unknown error
◆ _cI
◆ ID
◆ pX
the addressing mode (page/horizontal)
posX
Definition at line 377 of file eagle_LCD.h.
◆ pY
The documentation for this struct was generated from the following file: