EpdIf Class

EpdIf Class

Description
A class used to control the electronic paper display internal functions.

Syntax
class EpdIf

Members

Public Constructors
A public constructor should not be used as this class is intended to be a singleton class. Access member functions using the object instance named EpdIf.
Public Methods 
EpdIf::EPD_Dis_PartTransfer image data in the image buffer to the frame memory without updating the display.
EpdIf::EPD_SetFrameTransfer the character string data in the image buffer to the frame memory without updating the display.
EpdIf::EPD_SetRAMValue_BaseMapSet the RAM value with image data. Read the image data stored in the RAM, but not displaying on the screen.
EpdIf::EPD_SetFrameMemoryTo read image data stored in the buffer, but not display on the screen.
EpdIf::EPD_UpdateDisplayUpdate the display.
EpdIf::EPD_ClearScreen_WhiteClear the frame memory with the White color, but not updating the display.
EpdIf::EPD_ClearScreen_BlackClear the frame memory with the Black color, but not updating the display.
EpdIf::EPD_BusyCheck the status of the busy pin to see if next commands can continue to be executed.
EpdIf::EPD_ResetResetting the E-paper display module. It is often used to wake the module while it is in the deep sleep mode.
EpdIf::EPD_SleepThis function will get the E-paper display module to enter Deep Sleep mode for power saving.

EpdIf::EPD_Dis_Part

Description
All the image data are stored in an image buffer before it is written to the frame memory. The image data in the image buffer are then transferred into the frame memory with all the data representing in pixels to be displayed. However, the display will not update.

Syntax
void EPD_Dis_Part(unsigned int x_start, unsigned int y_start, const unsigned char* datas, unsigned int PART_COLUMN, unsigned int PART_LINE);

Parameters
x_start: The starting position of the x-axis.
y_start: The starting position of the y-axis.
datas: The image data to be displayed on the e-paper module.
PART_COLUMN: The height of the display area in pixel.
PART_LINE: The width of the display area in pixel.

Returns
NA

Example Code
Example: EinkDisplayImage
EinkDisplayImage .ino file can be found in AmebaEink zip folder (https://github.com/ambiot/ambd_arduino/blob/dev/Arduino_zip_libraries/AmebaEink.zip).

Notes and Warnings
EPD_UpdateDisplay() need to be called after this function to be able to see the actual display on the E-paper display.
“epdif.h” must be included to use the class function.

EpdIf::EPD_SetFrame

Description
All the data are stored in an image buffer before writing to the frame memory. The character string data in the image buffer are then transferred to the frame memory with all the data representing in pixels to be displayed. However, the display will not update.

Syntax
void EPD_SetFrame(const unsigned char* image_buffer, int x, int y, int image_width, int image_height);

Parameters
image_buffer: the buffer which stores the data to be displayed on the e-paper module.
x: starting position of the x-axis
y: starting position of the y-axis
image_width: width of the display area in pixel
image_height: height of the display area in pixel

Returns
NA

Example Code
Example: EinkDisplayText
EinkDisplayText .ino file can be found in AmebaEink zip folder (https://github.com/ambiot/ambd_arduino/blob/dev/Arduino_zip_libraries/AmebaEink.zip).

Notes and Warnings
EPD_UpdateDisplay() need to be called after this function to be able to see the actual display on the E-paper display.
“epdif.h” must be included to use the class function.

EpdIf::EPD_SetRAMValue_BaseMap

Description
Set the Random Access Memory (RAM) value with image data. Then, read the data stored in the RAM without displaying on the screen.

Syntax
void EPD_SetRAMValue_BaseMap(const unsigned char* datas);

Parameters
datas: black and white information of the image that are stored in the RAM.

Returns
NA

Example Code
Example: EinkDisplayImage
EinkDisplayImage .ino file can be found in AmebaEink zip folder. AmebaEink zip folder can be downloaded from https://github.com/ambiot/ambd_arduino/blob/dev/Arduino_zip_libraries/AmebaEink.zip

Notes and Warnings
“epdif.h” must be included to use the class function.

EpdIf::EPD_SetFrameMemory

Description
Image data to be displayed will be written into the frame memory.

Syntax
void EPD_SetFrameMemory(const unsigned char* image_buffer);

Parameters
image_buffer: the buffer storing all the image data in hexadecimal format.

Returns
NA

Example Code
NA

Notes and Warnings
EPD_UpdateDisplay() need to be called after this function to be able to see the actual display on the E-paper display.
“epdif.h” must be included to use the class function.

EpdIf::EPD_UpdateDisplay

Description
Update the e-Paper display module. Usually used together with functions that set the frame memory and then display the data from the frame memory to the display.

Syntax
void EPD_UpdateDisplay(void);

Parameters
NA

Returns
NA

Example Code
Example: EinkDisplayImage
EinkDisplayImage .ino file can be found in AmebaEink zip folder. AmebaEink zip folder can be downloaded from https://github.com/ambiot/ambd_arduino/blob/dev/Arduino_zip_libraries/AmebaEink.zip

Notes and Warnings
There are 2 memory areas embedded in the e-paper display but once this function is called, then the next action of SetFrameMemory or ClearScreen will set the other memory area.
“epdif.h” must be included to use the class function.

EpdIf::EPD_ClearScreen_White

Description
Clear the frame memory with White color.

Syntax
void EPD_ClearScreen_White(void);

Parameters
NA

Returns
NA

Example Code
NA

Notes and Warnings
EPD_UpdateDisplay() need to be called after this function to be able to see the actual display on the E-paper display.
“epdif.h” must be included to use the class function.

EpdIf::EPD_ClearScreen_Black

Description
Clear the frame memory with Black color.

Syntax
void EPD_ClearScreen_Black(void);

Parameters
NA

Returns
NA

Example Code
NA

Notes and Warnings
EPD_UpdateDisplay() need to be called after this function to be able to see the actual display on the E-paper display.
“epdif.h” must be included to use the class function.

EpdIf::EPD_Busy

Description
This function waits until the Busy_pin goes to IDLE mode. The busy_pin in high (“1”) state indicates that the E-paper display module is “busy” mode. Which further stops the next command from being executed. It will keep on checking the status of the busy_pin until the busy_pin goes to IDLE mode (“0”) in order to continue running the next commands.

Syntax
void EPD_Busy(void);

Parameters
NA

Returns
NA

Example Code
NA

Notes and Warnings
EPD_UpdateDisplay() need to be called after this function to be able to see the actual display on the E-paper display.
“epdif.h” must be included to use the class function.

EpdIf::EPD_Reset

Description
Resetting the E-paper display module. It is often used to wake the module while it is in the deep sleep mode. To know more about deep sleep mode, do refer to the function EPD_Sleep()

Syntax
void EPD_Reset(void);

Parameters
NA

Returns
NA

Example Code
NA

Notes and Warnings
“epdif.h” must be included to use the class function.

EpdIf::EPD_Sleep

Description
This function will get the E-paper display module to enter Deep Sleep mode for power saving.

Syntax
void EPD_Sleep(void);

Parameters
NA

Returns
NA

Example Code
NA

Notes and Warnings
EPD::Init() can be used to wake the E-paper display module. “epdif.h” must be included to use the class function.

請先確認已安裝QQ通訊軟體