Background
I am using an ePaper display (Adafruit 2.13" mono) to display weather data (BME280). I am using bits of code that I have borrowed from others to get this far.
As for progress I have worked in stages from a BME280 with a two line LCD, to a OLED display and so far the project works.
The ePaper display works as I can run the Adafruit Examples provided and the display performs as it should.
I have a problem in that the updated characters are being over written and not cleared, making one big black blob instead of a clear number on the screen.
My problem is either Hardware (pins wrong) or software (coding) and I honestly don't which one is wrong
Question.
There are some lines of code that I don't understand, so I am thinking is the display not quite right.
#define EPD_RESET 5 // can set to -1 and share with microcontroller Reset! #define EPD_BUSY 3 // can set to -1 to not use a pin (will wait a fixed delay)
I am not familiar with the library Adafruit_EPD.
But these e-paper displays usually need a buffer in the display class (display driver), and update from this buffer to the buffer in the controller and refresh to the screen. If you print with Adafruit_GFX dependent on the font you use and the use of foreground and background colors, only the foreground pixels overwrite the buffer. You need to clear the background or clear the whole buffer.
Thanks ZinggJM for the information, it has greatly helped my problem.
I still would be grateful for information if anyone could enlighten me as to my first question
Question.
There are some lines of code that I don't understand, so I am thinking is the display not quite right.
#define EPD_RESET 5 // can set to -1 and share with microcontroller Reset! #define EPD_BUSY 3 // can set to -1 to not use a pin (will wait a fixed delay)
What does "can set to -1" actually mean? Does the order that the information after Adafruit_SSD... 250,122 (display dimensions)....... correspond to a pin order?
For the record, on my Uno I have connected the epaper display like this
13 SCK, 12 MISO, 11 MOSI, 10 ECS, 9 d/c, 8 SRCS, 5 RST and 3 BUSY
Does the order that the information after Adafruit_SSD... 250,122 (display dimensions)....... correspond to a pin order?
Yes.
More exactly: these are the pin number parameters to use for the corresponding line to the e-paper and SRAM.
I assumed the comments are quite clear. If you pass -1 as pin number, the pin is not used, but for busy a fixed time for wait is used instead.
You need to be able to reset the controller, if ever you use the deep sleep option of the controller.
You can do this "by hand", if you connect rst to the reset pin of the processor.
Thank you for the explanations, there was a part of me that thought, bring it down to a -ve voltage!
Proof positive that there is no such thing as a stupid question, only some come pretty damn close!
Wallace