SSD1606
This commit is contained in:
parent
f17b0e0557
commit
00c4041a27
|
@ -164,6 +164,9 @@ class U8X8 : public Print
|
|||
void setFlipMode(uint8_t mode) {
|
||||
u8x8_SetFlipMode(&u8x8, mode); }
|
||||
|
||||
void refreshDisplay(void) { // Dec 16: Only required for SSD1606
|
||||
u8x8_RefreshDisplay(&u8x8); }
|
||||
|
||||
void setContrast(uint8_t value) {
|
||||
u8x8_SetContrast(&u8x8, value); }
|
||||
|
||||
|
|
|
@ -63,7 +63,13 @@ static void u8g2_send_tile_row(u8g2_t *u8g2, uint8_t src_tile_row, uint8_t dest_
|
|||
u8x8_DrawTile(u8g2_GetU8x8(u8g2), 0, dest_tile_row, w, ptr);
|
||||
}
|
||||
|
||||
void u8g2_SendBuffer(u8g2_t *u8g2)
|
||||
/*
|
||||
write the buffer to the display RAM.
|
||||
For most displays, this will make the content visible to the user.
|
||||
Some displays (like the SSD1606) require a u8x8_RefreshDisplay()
|
||||
*/
|
||||
static void u8g2_send_buffer(u8g2_t *u8g2) U8X8_NOINLINE;
|
||||
static void u8g2_send_buffer(u8g2_t *u8g2)
|
||||
{
|
||||
uint8_t src_row;
|
||||
uint8_t src_max;
|
||||
|
@ -83,6 +89,13 @@ void u8g2_SendBuffer(u8g2_t *u8g2)
|
|||
} while( src_row < src_max && dest_row < dest_max );
|
||||
}
|
||||
|
||||
/* same as u8g2_send_buffer but also send the DISPLAY_REFRESH message (used by SSD1606) */
|
||||
void u8g2_SendBuffer(u8g2_t *u8g2)
|
||||
{
|
||||
u8g2_send_buffer(u8g2);
|
||||
u8x8_RefreshDisplay( u8g2_GetU8x8(u8g2) );
|
||||
}
|
||||
|
||||
/*============================================*/
|
||||
void u8g2_SetBufferCurrTileRow(u8g2_t *u8g2, uint8_t row)
|
||||
{
|
||||
|
@ -93,20 +106,27 @@ void u8g2_SetBufferCurrTileRow(u8g2_t *u8g2, uint8_t row)
|
|||
void u8g2_FirstPage(u8g2_t *u8g2)
|
||||
{
|
||||
if ( u8g2->is_auto_page_clear )
|
||||
{
|
||||
u8g2_ClearBuffer(u8g2);
|
||||
}
|
||||
u8g2_SetBufferCurrTileRow(u8g2, 0);
|
||||
}
|
||||
|
||||
uint8_t u8g2_NextPage(u8g2_t *u8g2)
|
||||
{
|
||||
uint8_t row;
|
||||
u8g2_SendBuffer(u8g2);
|
||||
u8g2_send_buffer(u8g2);
|
||||
row = u8g2->tile_curr_row;
|
||||
row += u8g2->tile_buf_height;
|
||||
if ( row >= u8g2_GetU8x8(u8g2)->display_info->tile_height )
|
||||
{
|
||||
u8x8_RefreshDisplay( u8g2_GetU8x8(u8g2) );
|
||||
return 0;
|
||||
}
|
||||
if ( u8g2->is_auto_page_clear )
|
||||
{
|
||||
u8g2_ClearBuffer(u8g2);
|
||||
}
|
||||
u8g2_SetBufferCurrTileRow(u8g2, row);
|
||||
return 1;
|
||||
}
|
||||
|
|
20
csrc/u8x8.h
20
csrc/u8x8.h
|
@ -436,9 +436,22 @@ void u8x8_d_helper_display_init(u8x8_t *u8g2);
|
|||
*/
|
||||
#define U8X8_MSG_DISPLAY_DRAW_TILE 15
|
||||
|
||||
/* arg_ptr: layout struct */
|
||||
//#define U8X8_MSG_DISPLAY_GET_LAYOUT 16
|
||||
|
||||
/*
|
||||
Name: U8X8_MSG_DISPLAY_REFRESH
|
||||
Args:
|
||||
arg_int: -
|
||||
arg_ptr: -
|
||||
|
||||
This was introduced for the SSD1606 eInk display.
|
||||
The problem is, that all RAM access will not appear on the screen
|
||||
unless a special command is executed. With this message, this command
|
||||
sequence is executed.
|
||||
Use
|
||||
void u8x8_RefreshDisplay(u8x8_t *u8x8)
|
||||
to send the message to the display handler.
|
||||
*/
|
||||
#define U8X8_MSG_DISPLAY_REFRESH 16
|
||||
|
||||
/*==========================================*/
|
||||
/* u8x8_setup.c */
|
||||
|
@ -476,7 +489,10 @@ void u8x8_InitDisplay(u8x8_t *u8x8);
|
|||
void u8x8_SetPowerSave(u8x8_t *u8x8, uint8_t is_enable);
|
||||
void u8x8_SetFlipMode(u8x8_t *u8x8, uint8_t mode);
|
||||
void u8x8_SetContrast(u8x8_t *u8x8, uint8_t value);
|
||||
void u8x8_ClearDisplayWithTile(u8x8_t *u8x8, const uint8_t *buf) U8X8_NOINLINE;
|
||||
void u8x8_ClearDisplay(u8x8_t *u8x8); // this does not work for u8g2 in some cases
|
||||
void u8x8_FillDisplay(u8x8_t *u8x8);
|
||||
void u8x8_RefreshDisplay(u8x8_t *u8x8); // make RAM content visible on the display (Dec 16: SSD1606 only)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -32,13 +32,31 @@
|
|||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
SSD1606: 128x180x2
|
||||
command
|
||||
0x22: assign actions
|
||||
0x20: execute actions
|
||||
|
||||
action for command 0x022 are (more or less guessed)
|
||||
bit 7: Enable Clock
|
||||
bit 6: Enable Charge Pump
|
||||
bit 5: Load Temparture Value (???)
|
||||
bit 4: Load LUT (???)
|
||||
bit 3: Initial Display (???)
|
||||
bit 2: Pattern Display --> Requires about 945ms with the LUT from below
|
||||
bit 1: Disable Charge Pump
|
||||
bit 0: Disable Clock
|
||||
|
||||
Disable Charge Pump and Clock require about 267ms
|
||||
Enable Charge Pump and Clock require about 10ms
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "u8x8.h"
|
||||
|
||||
|
||||
#define L(a,b,c,d) (((a)<<6)|((b)<<4)|((c)<<2)|(d))
|
||||
|
||||
|
||||
/* GDE021A1, 2.1" EPD */
|
||||
static const uint8_t u8x8_d_ssd1606_172x72_gde021a1_init_seq[] = {
|
||||
|
@ -58,7 +76,9 @@ static const uint8_t u8x8_d_ssd1606_172x72_gde021a1_init_seq[] = {
|
|||
|
||||
U8X8_C(0x32), /* write LUT register*/
|
||||
|
||||
/* wavefrom part of the LUT */
|
||||
#ifdef ORIGINAL_LUT
|
||||
|
||||
/* wavefrom part of the LUT: absolute LUT... this will always force the destination color */
|
||||
U8X8_A4(0x00,0x00,0x00,0x55), /* step 0 */
|
||||
U8X8_A4(0x00,0x00,0x55,0x55), /* step 1 */
|
||||
U8X8_A4(0x00,0x55,0x55,0x55),
|
||||
|
@ -83,6 +103,37 @@ static const uint8_t u8x8_d_ssd1606_172x72_gde021a1_init_seq[] = {
|
|||
/* timing part of the LUT */
|
||||
U8X8_A8(0x22,0xFB,0x22,0x1B,0x00,0x00,0x00,0x00),
|
||||
U8X8_A(0x00),U8X8_A(0x00),
|
||||
|
||||
#else
|
||||
|
||||
/* the following LUT will not change anything if the old and the new values are the same */
|
||||
/* 03 02 01 00 13 12 11 10 23 22 21 20 33 32 31 30 original */
|
||||
U8X8_A4(L(0, 0, 0, 0), L(0, 0, 0, 0), L(0, 0, 0, 0), L(0, 1, 1, 1)), // 0x00,0x00,0x00,0x55, step 0
|
||||
U8X8_A4(L(0, 0, 0, 0), L(0, 0, 0, 0), L(1, 0, 1, 1), L(0, 1, 1, 1)), // 0x00,0x00,0x55,0x55, step 1
|
||||
U8X8_A4(L(0, 0, 0, 0), L(1, 1, 0, 1), L(1, 0, 1, 1), L(0, 1, 1, 1)), // 0x00,0x55,0x55,0x55, step 2
|
||||
U8X8_A4(L(2, 2, 2, 0), L(2, 2, 0, 2), L(2, 0, 2, 2), L(0, 2, 2, 2)), // 0xAA,0xAA,0xAA,0xAA, step 3
|
||||
U8X8_A4(L(0, 1, 1, 0), L(0, 1, 0, 1), L(0, 0, 1, 1), L(0, 1, 1, 1)), // 0x15,0x15,0x15,0x15, step 4
|
||||
U8X8_A4(L(0, 0, 1, 0), L(0, 0, 0, 1), L(0, 0, 1, 1), L(0, 0, 1, 1)), // 0x05,0x05,0x05,0x05, step 5
|
||||
U8X8_A4(L(0, 0, 0, 0), L(0, 0, 0, 1), L(0, 0, 0, 1), L(0, 0, 0, 1)), // 0x01,0x01,0x01,0x01, step 6
|
||||
U8X8_A4(0x00,0x00,0x00,0x00),
|
||||
U8X8_A4(0x00,0x00,0x00,0x00),
|
||||
U8X8_A4(0x00,0x00,0x00,0x00),
|
||||
U8X8_A4(0x00,0x00,0x00,0x00),
|
||||
U8X8_A4(0x00,0x00,0x00,0x00),
|
||||
U8X8_A4(0x00,0x00,0x00,0x00),
|
||||
U8X8_A4(0x00,0x00,0x00,0x00),
|
||||
U8X8_A4(0x00,0x00,0x00,0x00),
|
||||
U8X8_A4(0x00,0x00,0x00,0x00),
|
||||
U8X8_A4(0x00,0x00,0x00,0x00),
|
||||
U8X8_A4(0x00,0x00,0x00,0x00),
|
||||
U8X8_A4(0x00,0x00,0x00,0x00),
|
||||
U8X8_A4(0x00,0x00,0x00,0x00), /* step 19 */
|
||||
|
||||
/* timing part of the LUT */
|
||||
U8X8_A8(0x22,0xFB,0x22,0x1B,0x00,0x00,0x00,0x00),
|
||||
U8X8_A(0x00),U8X8_A(0x00),
|
||||
|
||||
#endif
|
||||
|
||||
U8X8_CA(0x2c, 0xa0), /* write vcom value*/
|
||||
U8X8_CA(0x3c, 0x63), /* select boarder waveform */
|
||||
|
@ -95,15 +146,22 @@ static const uint8_t u8x8_d_ssd1606_172x72_gde021a1_init_seq[] = {
|
|||
|
||||
static const uint8_t u8x8_d_ssd1606_to_display_seq[] = {
|
||||
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
|
||||
|
||||
U8X8_CA(0x22, 0xc0), /* display update seq. option: Enable clock and charge pump */
|
||||
U8X8_C(0x20), /* execute sequence */
|
||||
U8X8_DLY(10),
|
||||
|
||||
U8X8_CA(0x22, 0xc4), /* display update seq. option: clk -> CP -> LUT -> initial display -> pattern display */
|
||||
U8X8_C(0x20), /* execute sequence */
|
||||
U8X8_DLY(250), /* the sequence above requires about 970ms */
|
||||
U8X8_DLY(250),
|
||||
U8X8_DLY(250),
|
||||
U8X8_DLY(250),
|
||||
U8X8_DLY(230),
|
||||
|
||||
U8X8_CA(0x22, 0x03), /* disable clock and charge pump */
|
||||
U8X8_DLY(200), /* this requres about 370ms */
|
||||
U8X8_DLY(200),
|
||||
U8X8_DLY(200), /* this requres about 270ms */
|
||||
U8X8_DLY(90),
|
||||
|
||||
U8X8_END_TRANSFER(), /* disable chip */
|
||||
U8X8_END() /* end of sequence */
|
||||
};
|
||||
|
@ -161,6 +219,7 @@ static uint8_t *u8x8_convert_tile_for_ssd1606(uint8_t *t)
|
|||
return buf;
|
||||
}
|
||||
|
||||
static void u8x8_d_ssd1606_draw_tile(u8x8_t *u8x8, uint8_t arg_int, void *arg_ptr) U8X8_NOINLINE;
|
||||
static void u8x8_d_ssd1606_draw_tile(u8x8_t *u8x8, uint8_t arg_int, void *arg_ptr)
|
||||
{
|
||||
uint8_t x, c, page;
|
||||
|
@ -190,8 +249,6 @@ static void u8x8_d_ssd1606_draw_tile(u8x8_t *u8x8, uint8_t arg_int, void *arg_pt
|
|||
u8x8_cad_SendCmd(u8x8, 0x044 ); /* window end page */
|
||||
u8x8_cad_SendArg(u8x8, page);
|
||||
u8x8_cad_SendArg(u8x8, page+1);
|
||||
//u8x8_cad_SendArg(u8x8, page);
|
||||
//u8x8_cad_SendArg(u8x8, page+1);
|
||||
|
||||
u8x8_cad_SendCmd(u8x8, 0x04f ); /* window column */
|
||||
u8x8_cad_SendArg(u8x8, x);
|
||||
|
@ -222,8 +279,6 @@ static void u8x8_d_ssd1606_draw_tile(u8x8_t *u8x8, uint8_t arg_int, void *arg_pt
|
|||
|
||||
static uint8_t u8x8_d_ssd1606_172x72_generic(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
|
||||
{
|
||||
uint8_t x, c, page, a;
|
||||
uint8_t *ptr;
|
||||
switch(msg)
|
||||
{
|
||||
/* handled by the calling function
|
||||
|
@ -235,33 +290,18 @@ static uint8_t u8x8_d_ssd1606_172x72_generic(u8x8_t *u8x8, uint8_t msg, uint8_t
|
|||
|
||||
u8x8_d_helper_display_init(u8x8);
|
||||
u8x8_cad_SendSequence(u8x8, u8x8_d_ssd1606_172x72_gde021a1_init_seq);
|
||||
|
||||
|
||||
u8x8_cad_SendCmd(u8x8, 0x044 );
|
||||
u8x8_cad_SendArg(u8x8, 0 );
|
||||
u8x8_cad_SendArg(u8x8, 31 );
|
||||
u8x8_cad_SendCmd(u8x8, 0x045 );
|
||||
u8x8_cad_SendArg(u8x8, 0 );
|
||||
u8x8_cad_SendArg(u8x8, 179 );
|
||||
|
||||
u8x8_cad_SendCmd(u8x8, 0x04e );
|
||||
u8x8_cad_SendArg(u8x8, 4 );
|
||||
u8x8_cad_SendCmd(u8x8, 0x04f );
|
||||
u8x8_cad_SendArg(u8x8, 4 );
|
||||
|
||||
u8x8_cad_SendCmd(u8x8, 0x024 );
|
||||
u8x8_cad_SendArg(u8x8, 0xff );
|
||||
u8x8_cad_SendArg(u8x8, 0xff );
|
||||
u8x8_cad_SendArg(u8x8, 0xff );
|
||||
u8x8_cad_SendArg(u8x8, 0xff );
|
||||
|
||||
u8x8_cad_SendArg(u8x8, 0xf0 );
|
||||
u8x8_cad_SendArg(u8x8, 0xf0 );
|
||||
u8x8_cad_SendArg(u8x8, 0xf0);
|
||||
u8x8_cad_SendArg(u8x8, 0xf0);
|
||||
|
||||
u8x8_cad_SendSequence(u8x8, u8x8_d_ssd1606_to_display_seq);
|
||||
|
||||
/* special code for the SSD1606... */
|
||||
/* ensure that the initial buffer is clear and all eInk is set to white */
|
||||
/* this is done here, because the LUT will be of that kind, that it uses the previous color */
|
||||
/* make everything black */
|
||||
u8x8_FillDisplay(u8x8);
|
||||
/* write content to the display */
|
||||
u8x8_RefreshDisplay(u8x8);
|
||||
/* now make everything clear */
|
||||
u8x8_ClearDisplay(u8x8);
|
||||
/* write content to the display */
|
||||
u8x8_RefreshDisplay(u8x8);
|
||||
|
||||
break;
|
||||
case U8X8_MSG_DISPLAY_SET_POWER_SAVE:
|
||||
|
@ -292,14 +332,9 @@ static uint8_t u8x8_d_ssd1606_172x72_generic(u8x8_t *u8x8, uint8_t msg, uint8_t
|
|||
#endif
|
||||
case U8X8_MSG_DISPLAY_DRAW_TILE:
|
||||
u8x8_d_ssd1606_draw_tile(u8x8, arg_int, arg_ptr);
|
||||
|
||||
break;
|
||||
case U8X8_MSG_DISPLAY_REFRESH:
|
||||
u8x8_cad_SendSequence(u8x8, u8x8_d_ssd1606_to_display_seq);
|
||||
|
||||
u8x8_d_ssd1606_draw_tile(u8x8, arg_int, arg_ptr);
|
||||
|
||||
u8x8_cad_SendSequence(u8x8, u8x8_d_ssd1606_to_display_seq);
|
||||
|
||||
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
|
|
|
@ -115,10 +115,13 @@ void u8x8_SetContrast(u8x8_t *u8x8, uint8_t value)
|
|||
u8x8->display_cb(u8x8, U8X8_MSG_DISPLAY_SET_CONTRAST, value, NULL);
|
||||
}
|
||||
|
||||
|
||||
void u8x8_ClearDisplay(u8x8_t *u8x8)
|
||||
void u8x8_RefreshDisplay(u8x8_t *u8x8)
|
||||
{
|
||||
u8x8->display_cb(u8x8, U8X8_MSG_DISPLAY_REFRESH, 0, NULL);
|
||||
}
|
||||
|
||||
void u8x8_ClearDisplayWithTile(u8x8_t *u8x8, const uint8_t *buf)
|
||||
{
|
||||
uint8_t buf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
u8x8_tile_t tile;
|
||||
uint8_t h;
|
||||
|
||||
|
@ -135,3 +138,14 @@ void u8x8_ClearDisplay(u8x8_t *u8x8)
|
|||
} while( tile.y_pos < h );
|
||||
}
|
||||
|
||||
void u8x8_ClearDisplay(u8x8_t *u8x8)
|
||||
{
|
||||
uint8_t buf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
u8x8_ClearDisplayWithTile(u8x8, buf);
|
||||
}
|
||||
|
||||
void u8x8_FillDisplay(u8x8_t *u8x8)
|
||||
{
|
||||
uint8_t buf[8] = { 255, 255, 255, 255, 255, 255, 255, 255 };
|
||||
u8x8_ClearDisplayWithTile(u8x8, buf);
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
//U8G2_UC1611_EA_DOGM240_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due DOGXL240 Test Board
|
||||
//U8G2_UC1611_EA_DOGXL240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board
|
||||
//U8G2_UC1611_EA_DOGXL240_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due DOGXL240 Test Board
|
||||
//U8G2_SSD1606_172X72_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display
|
||||
U8G2_SSD1606_172X72_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ AVRDUDE_PATH:=$(ARDUINO_PATH)hardware/tools/
|
|||
# The unix device where we can reach the arduino board
|
||||
# Uno: /dev/ttyACM0
|
||||
# Duemilanove: /dev/ttyUSB0
|
||||
AVRDUDE_PORT:=/dev/ttyACM0
|
||||
AVRDUDE_PORT:=/dev/ttyACM1
|
||||
|
||||
# List of all libaries which should be included.
|
||||
EXTRA_DIRS=$(ARDUINO_PATH)libraries/LiquidCrystal/
|
||||
|
|
|
@ -93,12 +93,17 @@
|
|||
//U8X8_UC1611_EA_DOGM240_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due DOGXL240 Test Board
|
||||
//U8X8_UC1611_EA_DOGXL240_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board
|
||||
//U8X8_UC1611_EA_DOGXL240_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due DOGXL240 Test Board
|
||||
//U8X8_SSD1606_172X72_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display
|
||||
U8X8_SSD1606_172X72_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display
|
||||
|
||||
|
||||
// End of constructor list
|
||||
|
||||
|
||||
/*
|
||||
This example will probably not work with the SSD1606, because of the
|
||||
internal buffer swapping
|
||||
*/
|
||||
|
||||
void setup(void)
|
||||
{
|
||||
/* U8g2 Project: KS0108 Test Board */
|
||||
|
@ -152,6 +157,7 @@ void loop(void)
|
|||
u8x8.print("github.com/");
|
||||
u8x8.setCursor(0,2);
|
||||
u8x8.print("olikraus/u8g2");
|
||||
u8x8.refreshDisplay(); // for SSD1606
|
||||
delay(2000);
|
||||
u8x8.setCursor(0,3);
|
||||
u8x8.print("Tile size:");
|
||||
|
@ -159,14 +165,16 @@ void loop(void)
|
|||
u8x8.print("x");
|
||||
u8x8.print((int)u8x8.getRows());
|
||||
|
||||
u8x8.refreshDisplay(); // for SSD1606
|
||||
delay(2000);
|
||||
pre();
|
||||
|
||||
for( i = 19; i > 0; i-- )
|
||||
{
|
||||
pre();
|
||||
u8x8.setCursor(3,2);
|
||||
u8x8.print(i);
|
||||
u8x8.print(" ");
|
||||
u8x8.refreshDisplay(); // for SSD1606
|
||||
delay(200);
|
||||
}
|
||||
|
||||
|
@ -175,6 +183,7 @@ void loop(void)
|
|||
{
|
||||
draw_bar(c, 1);
|
||||
draw_bar(c-1, 0);
|
||||
u8x8.refreshDisplay(); // for SSD1606
|
||||
delay(50);
|
||||
}
|
||||
draw_bar(u8x8.getCols()-1, 0);
|
||||
|
@ -187,7 +196,8 @@ void loop(void)
|
|||
{
|
||||
draw_ascii_row(r, (r-1+d)*u8x8.getCols() + 32);
|
||||
}
|
||||
delay(1000);
|
||||
u8x8.refreshDisplay(); // for SSD1606
|
||||
delay(800);
|
||||
}
|
||||
|
||||
draw_bar(u8x8.getCols()-1, 1);
|
||||
|
@ -195,6 +205,7 @@ void loop(void)
|
|||
{
|
||||
draw_bar(c-1, 1);
|
||||
draw_bar(c, 0);
|
||||
u8x8.refreshDisplay(); // for SSD1606
|
||||
delay(50);
|
||||
}
|
||||
draw_bar(0, 0);
|
||||
|
@ -202,6 +213,7 @@ void loop(void)
|
|||
pre();
|
||||
u8x8.drawString(0, 2, "Small");
|
||||
u8x8.draw2x2String(0, 5, "Big");
|
||||
u8x8.refreshDisplay(); // for SSD1606
|
||||
delay(3000);
|
||||
|
||||
pre();
|
||||
|
@ -210,6 +222,7 @@ void loop(void)
|
|||
u8x8.println("println");
|
||||
delay(500);
|
||||
u8x8.println("done");
|
||||
u8x8.refreshDisplay(); // for SSD1606
|
||||
delay(1500);
|
||||
|
||||
}
|
||||
|
|
|
@ -117,7 +117,9 @@ void loop(void)
|
|||
{
|
||||
u8x8.setFont(u8x8_font_chroma48medium8_r);
|
||||
u8x8.drawString(0,1,"Hello World!");
|
||||
u8x8.refreshDisplay(); // for SSD1606
|
||||
delay(1000);
|
||||
|
||||
/*
|
||||
delay(1000);
|
||||
u8x8.setPowerSave(1);
|
||||
|
|
Loading…
Reference in New Issue