2020-12-10
This commit is contained in:
parent
751a9fb93f
commit
04d4621789
493 changed files with 128806 additions and 689 deletions
|
|
@ -206,10 +206,7 @@ void Epd::Clear(void)
|
|||
}
|
||||
}
|
||||
//DISPLAY REFRESH
|
||||
SendCommand(0x22);
|
||||
SendData(0xF7);
|
||||
SendCommand(0x20);
|
||||
WaitUntilIdle();
|
||||
DisplayFrame();
|
||||
}
|
||||
|
||||
void Epd::Display(const unsigned char* frame_buffer)
|
||||
|
|
@ -227,10 +224,7 @@ void Epd::Display(const unsigned char* frame_buffer)
|
|||
}
|
||||
|
||||
//DISPLAY REFRESH
|
||||
SendCommand(0x22);
|
||||
SendData(0xF7);
|
||||
SendCommand(0x20);
|
||||
WaitUntilIdle();
|
||||
DisplayFrame();
|
||||
}
|
||||
|
||||
void Epd::DisplayPartBaseImage(const unsigned char* frame_buffer)
|
||||
|
|
@ -255,10 +249,7 @@ void Epd::DisplayPartBaseImage(const unsigned char* frame_buffer)
|
|||
}
|
||||
|
||||
//DISPLAY REFRESH
|
||||
SendCommand(0x22);
|
||||
SendData(0xFF);
|
||||
SendCommand(0x20);
|
||||
WaitUntilIdle();
|
||||
DisplayFrame();
|
||||
}
|
||||
void Epd::DisplayPartBaseWhiteImage(void)
|
||||
{
|
||||
|
|
@ -281,10 +272,7 @@ void Epd::DisplayPartBaseWhiteImage(void)
|
|||
|
||||
|
||||
//DISPLAY REFRESH
|
||||
SendCommand(0x22);
|
||||
SendData(0xFF);
|
||||
SendCommand(0x20);
|
||||
WaitUntilIdle();
|
||||
DisplayFrame();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -303,10 +291,7 @@ void Epd::DisplayPart(const unsigned char* frame_buffer)
|
|||
}
|
||||
|
||||
//DISPLAY REFRESH
|
||||
SendCommand(0x22);
|
||||
SendData(0xFF);
|
||||
SendCommand(0x20);
|
||||
WaitUntilIdle();
|
||||
DisplayPartFrame();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -376,6 +361,13 @@ void Epd::SetFrameMemory(
|
|||
{
|
||||
int x_end;
|
||||
int y_end;
|
||||
|
||||
DigitalWrite(reset_pin, LOW); //module reset
|
||||
DelayMs(10);
|
||||
DigitalWrite(reset_pin, HIGH);
|
||||
DelayMs(10);
|
||||
SendCommand(0x3c);
|
||||
SendData(0x80);
|
||||
|
||||
if (
|
||||
image_buffer == NULL ||
|
||||
|
|
|
|||
|
|
@ -62,22 +62,20 @@ void setup()
|
|||
|
||||
//Part display
|
||||
epd.HDirInit();
|
||||
epd.Clear();
|
||||
epd.DisplayPartBaseWhiteImage();
|
||||
epd.DisplayPartBaseImage(IMAGE_DATA);
|
||||
|
||||
//paint.SetRotate(90);
|
||||
paint.SetWidth(200);
|
||||
paint.SetHeight(20);
|
||||
paint.SetWidth(50);
|
||||
paint.SetHeight(60);
|
||||
paint.Clear(UNCOLORED);
|
||||
|
||||
char i = 0;
|
||||
char str[10][10] = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"};
|
||||
for (i = 0; i < 10; i++) {
|
||||
paint.Clear(UNCOLORED);
|
||||
paint.DrawStringAt(0, 0, str[i], &Font24, COLORED);
|
||||
epd.SetFrameMemory(paint.GetImage(), 20, 20, paint.GetWidth(), paint.GetHeight());
|
||||
paint.DrawStringAt(10, 10, str[i], &Font24, COLORED);
|
||||
epd.SetFrameMemory(paint.GetImage(), 80, 70, paint.GetWidth(), paint.GetHeight());
|
||||
epd.DisplayPartFrame();
|
||||
delay(200);
|
||||
delay(100);
|
||||
}
|
||||
|
||||
Serial.println("e-Paper clear and goto sleep");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue