驴友花雕 发表于 2021-12-1 07:34:22



驴友花雕 发表于 2021-12-1 07:37:00

本帖最后由 驴友花雕 于 2021-12-1 08:00 编辑



驴友花雕 发表于 2021-12-1 07:40:58


驴友花雕 发表于 2021-12-1 07:42:42


驴友花雕 发表于 2021-12-1 07:50:53

电子纸墨水屏驱动扩展板(e-Paper Shield)电原理图



驴友花雕 发表于 2021-12-1 07:57:59


驴友花雕 发表于 2021-12-1 08:16:08

本帖最后由 驴友花雕 于 2021-12-1 08:17 编辑



e-paper shield 相关资料
https://www.waveshare.net/wiki/E-Paper_Shield
https://www.waveshare.net/w/upload/c/c6/Zimo221.7z
https://github.com/Seeed-Studio/Small_ePaper_Shield
https://www.waveshare.net/w/upload/3/36/Image2Lcd.7z
https://www.waveshare.net/wiki/E-Paper-Floyd-Steinberg
https://www.waveshare.net/w/upload/e-Paper_Shield_Code.7z
https://www.waveshare.net/study/portal.php?mod=list&catid=40
https://www.waveshare.net/w/uplo ... hield_Schematic.pdf
https://www.waveshare.net/w/uplo ... ate_for_e-Paper.pdf
https://www.tspweb.com/key/%E5%B ... 8A%A8%E6%9D%BF.html

驴友花雕 发表于 2021-12-1 08:46:13


驴友花雕 发表于 2021-12-4 10:26:54

【Arduino】168种传感器模块系列实验(资料代码+仿真编程+图形编程)
实验二百一十七:EPD Eink 电子墨水显示器 SUNY 2.9 英寸 EPD 屏幕无线数字电子纸显示器模块DEPG0290RWS800F6黑红三色墨水屏
实验说明:使用傲雪驱动库e-Paper(扩展板直接插入uno)
项目十六:测试 e-Paper Shield 扩展板



驴友花雕 发表于 2021-12-4 10:32:11

   实验开源代码

/*【Arduino】168种传感器模块系列实验(资料代码+仿真编程+图形编程)
实验二百一十七:EPD Eink 电子墨水显示器 SUNY 2.9 英寸 EPD 屏幕无线数字电子纸显示器模块DEPG0290RWS800F6黑红三色墨水屏
实验说明:使用傲雪驱动库e-Paper(扩展板直接插入uno)
项目十六:测试 e-Paper Shield 扩展板
*/

#include "EPD.h"
#include "GUI_Paint.h"
#include "ImageData.h"
#include "EPD_SDCard.h"

void setup() {
DEBUG("2.9inch e-Paper B and C demo\r\n");
DEV_Module_Init();

EPD_2IN9BC_Init();
EPD_2IN9BC_Clear();
DEV_Delay_ms(500);
#if 0
/*show sd card pic*/
//1.Initialize the SD card
SDCard_Init();

//2.Create a new image cache named IMAGE_BW and fill it with white
//Draw black image
DEBUG("IMAGE_BW\n");
Paint_NewImage(IMAGE_BW, EPD_2IN9BC_WIDTH, EPD_2IN9BC_HEIGHT, IMAGE_ROTATE_0, IMAGE_COLOR_POSITIVE);
Paint_Clear(WHITE);
//3.Read BMP images into RAM
//    SDCard_ReadBMP("2in9b-b.bmp", 0, 0);
SDCard_ReadBMP("2in9c-b.bmp", 0, 0);

//Draw red image
DEBUG("IMAGE_BWR\n");
Paint_NewImage(IMAGE_BWR, EPD_2IN9BC_WIDTH, EPD_2IN9BC_HEIGHT, IMAGE_ROTATE_0, IMAGE_COLOR_POSITIVE);
Paint_Clear(WHITE);
//    SDCard_ReadBMP("2in9b-r.bmp", 0, 0);
SDCard_ReadBMP("2in9c-y.bmp", 0, 0);

//4.Refresh the picture in RAM to e-Paper
EPD_2IN9BC_Display();
DEV_Delay_ms(2000);
#elif 1
/*show image for array*/
//1.Draw black image
Paint_NewImage(IMAGE_BW, EPD_2IN9BC_WIDTH, EPD_2IN9BC_HEIGHT, IMAGE_ROTATE_0, IMAGE_COLOR_POSITIVE);
Paint_DrawBitMap(IMAGE_BLACK);

//2.Draw red image
Paint_NewImage(IMAGE_BWR, EPD_2IN9BC_WIDTH, EPD_2IN9BC_HEIGHT, IMAGE_ROTATE_0, IMAGE_COLOR_POSITIVE);
Paint_DrawBitMap(IMAGE_RED);

//3.Refresh the picture in RAM to e-Paper
DEBUG("EPD_2IN9BC_Display\r\n");
EPD_2IN9BC_Display();
DEV_Delay_ms(8000);
#endif

#if 0
/*Horizontal screen*/
//1.Draw black image
Paint_NewImage(IMAGE_BW, EPD_2IN9BC_WIDTH, EPD_2IN9BC_HEIGHT, IMAGE_ROTATE_90, IMAGE_COLOR_POSITIVE);
Paint_Clear(WHITE);
Paint_DrawPoint(5, 70, BLACK, DOT_PIXEL_1X1, DOT_STYLE_DFT);
Paint_DrawPoint(5, 80, BLACK, DOT_PIXEL_2X2, DOT_STYLE_DFT);
Paint_DrawLine(20, 70, 50, 100, BLACK, LINE_STYLE_SOLID, DOT_PIXEL_1X1);
Paint_DrawLine(50, 70, 20, 100, BLACK, LINE_STYLE_SOLID, DOT_PIXEL_1X1);
Paint_DrawRectangle(60, 70, 90, 100, BLACK, DRAW_FILL_FULL, DOT_PIXEL_1X1);
Paint_DrawCircle(125, 85, 15, BLACK, DRAW_FILL_EMPTY, DOT_PIXEL_1X1);
Paint_DrawString_EN(5, 15, "hello world", &Font12, WHITE, BLACK);
Paint_DrawNum(5, 30, 123456789, &Font16, BLACK, WHITE);

//2.Draw red image
Paint_NewImage(IMAGE_BWR, EPD_2IN9BC_WIDTH, EPD_2IN9BC_HEIGHT, IMAGE_ROTATE_90, IMAGE_COLOR_POSITIVE);
Paint_Clear(WHITE);
Paint_DrawPoint(5, 90, RED, DOT_PIXEL_3X3, DOT_STYLE_DFT);
Paint_DrawPoint(5, 100, RED, DOT_PIXEL_4X4, DOT_STYLE_DFT);
Paint_DrawLine(125, 70, 125, 100, RED, LINE_STYLE_DOTTED, DOT_PIXEL_1X1);
Paint_DrawLine(110, 85, 140, 85, RED, LINE_STYLE_DOTTED, DOT_PIXEL_1X1);
Paint_DrawRectangle(20, 70, 50, 100, RED, DRAW_FILL_EMPTY, DOT_PIXEL_1X1);
Paint_DrawCircle(165, 85, 15, RED, DRAW_FILL_FULL, DOT_PIXEL_1X1);
Paint_DrawString_EN(5, 0, "waveshare Electronics", &Font12, BLACK, WHITE);
Paint_DrawNum(5, 50, 987654321, &Font16, WHITE, RED);

//3.Refresh the image in RAM to e-Paper
EPD_2IN9BC_Display();
#endif
DEV_Delay_ms(3000);
EPD_2IN9BC_Clear();

EPD_2IN9BC_Sleep();
DEV_Module_Exit();
}

void loop() {
}

驴友花雕 发表于 2021-12-4 11:06:40

上述程序可以通过编译,上传时间有点长,出错信息如下:


C:\Program Files (x86)\Arduino\libraries\EPD\src/EPD.h:1:18: warning: extra tokens at end of #ifndef directive

#ifndef __utility/EPD_H_

                  ^

C:\Program Files (x86)\Arduino\libraries\EPD\src/EPD.h:2:18: warning: ISO C++11 requires whitespace after the macro name

#define __utility/EPD_H_

                  ^



驴友花雕 发表于 2021-12-4 11:07:11

本帖最后由 驴友花雕 于 2021-12-4 11:36 编辑

使用记事本打开EPD.h库,好像出错的就是第一和第二行


页: 1 2 3 4 [5]
查看完整版本: 【Arduino】168种传感器系列实验(217)---2.9寸红黑三色墨水屏