2.13inch EPAPER displays blur image

I downloaded the oldest (08:14, 15 May 2017) sample code form waveshare page.

https://www.waveshare.com/wiki/File:2.13inch_e-Paper_HAT-code.7z

and i modified that code to create a BARCODE ,while trying this it shows blur image.How could i change the code to get correct Barcode.

#include <SPI.h>
#include “EPD_drive.h”
#include “EPD_drive_gpio.h”
#include “Display_Lib.h”
#include <epd1in54.h>
#include <epdpaint.h >

unsigned char image[100];
Paint paint(image, 0, 0);

#define COLORED 0
#define UNCOLORED 1

const int maxBarcodeSize = 10;
int barcode[maxBarcodeSize];
int barcodeText[maxBarcodeSize];
int barcodePos;
int barcodeLength;

// 0 1 2 3 4 5 6 7 8 9
int barcodeDecimal = {2669, 3371, 2859, 3477, 2667, 3381, 2869, 2651, 3373, 2861};

int astrix = 2413;

String drawBarcode = “no”;

int xPosition;

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();

EPD.EPD_init_Part();
driver_delay_xms(DELAYTIME);

Serial.println("--------------Clear part screen------------");
EPD.Dis_Clear_part();
driver_delay_xms(DELAYTIME);

}

void loop() {

while (Serial.available()>0){
barcodeText[barcodePos] = Serial.read();
Serial.println(barcodeText[barcodePos]);
if(barcodeText[barcodePos]>47 && barcodeText[barcodePos]<58){
barcode[barcodePos] = barcodeText[barcodePos]-48;
}

if(barcodeText[barcodePos]==46){
barcodeLength = barcodePos;
drawBarcode = “yes”;

}

if(barcodePos>(maxBarcodeSize-1)){
barcodeLength = barcodePos;
drawBarcode = “yes”;
}

barcodePos++;
}

if(drawBarcode == “yes”){

xPosition = 15;
drawBCode(astrix, ’ ');

for(int digit=0; digit<barcodeLength; digit++){
drawBCode(barcodeDecimal[barcode[digit]], barcodeText[digit]);
Serial.println(barcodeDecimal[barcode[digit]], barcodeText[digit]);
}

drawBCode(astrix, ’ ');
EPD.Dis_pic(0,100,0,100,(unsigned char *)image);
drawBarcode = “no”;
barcodePos=0;
}
}

void drawBCode(int bCode, char bCodeText){

xPosition++;
for (int barPos = 11; barPos > -1; barPos–){
xPosition++;
if(bitRead(bCode, barPos)==1){

paint.DrawLine(xPosition, 0, 60, 60, COLORED);
}
}

}

I want to display the product name,price and respective barcode in 2.13 inch Epaper display.I tried some sample code which is present in waveshare.But my device accepts only the code that was published in early 2017. If I try to load new code into the Epaper display it says that 465% of dynamic memory is utilized. So in order to create memory space should I have to add additional device? I don't know what the error is or where I am going wrong. Can anyone help me with this?

I think I have seen two other Threads with the same Title.

Don't Double Post.

Click Report to Moderator and ask to have them merged, or all but one of them deleted.

...R

what is the procedure to report this issue @Robin2

anupriyaAmir:
what is the procedure to report this issue @Robin2

I told you how to do that in Reply #2

...R