You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we are trying the example DEPG0290BxS75AFxX_BW.ino the compiler gives us the following error
/home/####/Arduino/libraries/e-ink-master/examples/DEPG0290BxS75AFxX_BW/DEPG0290BxS75AFxX_BW.ino: In function 'void setup()':
DEPG0290BxS75AFxX_BW:38:5: error: 'epd290bw' was not declared in this scope
38 |epd290bw.EPD_Init(); //Electronic paper initialization
| ^~~~~~~~
exit status 1
'epd290bw' was not declared in this scope
after a quick review, we can see that in the third elif for AVR devices (line 29) the objectDEPG0290BxS75AFxX_BW epd290bw was not declared which created the error.
To fix the error I have added the declaration of the object and added the CLK_PIN to 13
Here is what the file looks like after the change :
/*DEPG0290BxS75AFxX_BW is a 2.9 inch black and white screenDisplay Resolution 128(H)×296(V)*/
#include"DEPG0290BxS75AFxX_BW.h"
#include"picture.h"
#defineUNDEFINED -1
#ifdef CubeCell_Board //AB01
#defineFREQUENCY2000000
DEPG0290BxS75AFxX_BW epd290bw(GPIO1, GPIO2, GPIO3, GPIO5, UNDEFINED, SPI_NUM_0, FREQUENCY);//reset_pin, dc_pin, cs_pin, busy_pin, clk_pin, spi_num, frequency
#elif defined( ESP32 )
#defineRST_PIN16
#defineDC_PIN22
#defineCS_PIN18
#defineBUSY_PIN23
#defineCLK_PIN5
DEPG0290BxS75AFxX_BW epd290bw(RST_PIN, DC_PIN, CS_PIN, BUSY_PIN, CLK_PIN);//reset_pin, dc_pin, cs_pin, busy_pin, clk_pin
#elif defined( ESP8266 )
#defineRST_PIN16
#defineDC_PIN4
#defineCS_PIN15
#defineBUSY_PIN5
#defineCLK_PIN14
DEPG0290BxS75AFxX_BW epd290bw(RST_PIN, DC_PIN, CS_PIN, BUSY_PIN, CLK_PIN);//reset_pin, dc_pin, cs_pin, busy_pin, clk_pin
#elif defined ( AVR )
#defineRST_PIN8
#defineDC_PIN9
#defineCS_PIN10
#defineBUSY_PIN7
#defineCLK_PIN13//#define SDI 11 // Pin MOSI
DEPG0290BxS75AFxX_BW epd290bw(RST_PIN, DC_PIN, CS_PIN, BUSY_PIN, CLK_PIN);//reset_pin, dc_pin, cs_pin, busy_pin, clk_pin
#endifvoidsetup() {
Serial.begin(115200);
epd290bw.EPD_Init(); //Electronic paper initialization
epd290bw.EPD_ALL_image(gImage_290image_bw); //Refresh the picture in full screen// delay(1000);// epd290bw.EPD_WhiteScreen_Black();// delay(1000);// epd290bw.EPD_WhiteScreen_White();
epd290bw.EPD_DeepSleep(); //Enter deep sleep
}
voidloop() {
}
The text was updated successfully, but these errors were encountered:
When we are trying the example
DEPG0290BxS75AFxX_BW.ino
the compiler gives us the following errorafter a quick review, we can see that in the third
elif
for AVR devices (line29
) theobject
DEPG0290BxS75AFxX_BW epd290bw
was not declared which created the error.To fix the error I have added the declaration of the object and added the
CLK_PIN
to 13Here is what the file looks like after the change :
The text was updated successfully, but these errors were encountered: