Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <SPI.h>
- #include "EPD_drive.h"
- #include "EPD_drive_gpio.h"
- #include "Display_Lib.h"
- WaveShare_EPD EPD = WaveShare_EPD();
- void setup() {
- // put your setup code here, to run once:
- pinMode(CS,OUTPUT);
- pinMode(DC,OUTPUT);
- pinMode(RST,OUTPUT);
- pinMode(BUSY,INPUT);
- Serial.begin(115200);
- SPI.beginTransaction(SPISettings(2000000, MSBFIRST, SPI_MODE0));
- SPI.begin();
- Serial.println("------------Clear full screen-----------------");
- EPD.Dis_Clear_full();
- //2.display init
- EPD.EPD_init_Part();
- driver_delay_xms(DELAYTIME);
- //Clear screen
- Serial.println("--------------Clear part screen------------");
- EPD.Dis_Clear_part();
- driver_delay_xms(DELAYTIME);
- //2.9inch paper is 296*122
- //x max is 31 ,y max is
- EPD.Dis_Drawing(31,0,(unsigned char *)Circle3232,32,32); //Circle
- EPD.Dis_Drawing(0,0,(unsigned char *)Circle3232,32,32); //Line
- EPD.Dis_Drawing(0,12,(unsigned char *)Circle3232,32,32); //Line
- EPD.Dis_Drawing(31,12,(unsigned char *)Circle3232,32,32); //Line
- }
- void loop() {
- // put your main code here, to run repeatedly:
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement