Skip to content

Commit

Permalink
fix: lower expectations for ATmega2560
Browse files Browse the repository at this point in the history
  • Loading branch information
todd-herbert committed Sep 12, 2023
1 parent 597eb0a commit a8f817d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
3 changes: 2 additions & 1 deletion docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,8 @@ The width of the string.
___
### `overwrite()`

**Not supported on ATmega328P (Uno / Nano)**
**ATmega328P (Uno / Nano): not supported**<br />
**ATmega2560: disabled for some displays**

Execute drawing commands outside a `DRAW` loop, drawing on-top of the existing screen data.

Expand Down
5 changes: 4 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,14 @@ It takes a bit longer, but without paging, Arduino Uno R3 wouldn't stand a chanc

![paging graphic](/docs/paging_graphic.png)

If you have a more powerful board (ESP, Mega), the library won't waste time paging. Your image will be calculated once, and once only.
If you have a more powerful board (ESP32 ESP8266), the library won't waste time paging. Your image will be calculated once, and once only.

If you board has the resources, paging is disabled automatically.
If, for any reason, you should want to turn it back on, you can set a `page_height` in your [constructor](/docs/API.md#display-constructors).

**ATmega2560 is marginal.** <br /> Paging is used for some displays. On other displays, a large amount of RAM is occupied.
DEPG0290BNS800 uses **60% of ATmega2560's RAM**. If this in unacceptable, enable paging by setting a `page_height` in your [constructor](/docs/API.md#display-constructors).

## Drawing stuff

```c++
Expand Down
3 changes: 2 additions & 1 deletion examples/overwrite/overwrite.ino
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "heltec-eink-modules.h"

// -- Example will not run on Arduino Uno / Nano --
// -- Example will not run on Arduino Uno / Nano
// -- Example *may* run on Arduino Mega

// Find your wiring - https://github.com/todd-herbert/heltec-eink-modules#wiring
// ----------------
Expand Down
4 changes: 2 additions & 2 deletions examples/xbitmap_multicolor/xbitmap_multicolor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
// DEMO: Multicolor XBitmap Images
// =================================
// XBitmap is an old image file format from the early days of the internet
// It was very inefficient as the imagedata was stored more or less as human readable C code
// It was very inefficient as the image data was stored more or less as human readable C code
// This, however, serves our purposes very well. As such, Adafruit have chosen to add support for XBM images
// These can be easily created with the free GIMP software.

Expand All @@ -53,7 +53,7 @@ PANEL_CLASS display(DC_PIN, CS_PIN, BUSY_PIN);
void setup() {
display.setRotation(PINS_LEFT); // Don't forget to set the orientation, so your image fits how you intended

while( display.calculating() ) {
DRAW (display) {
// Draw each image to its destination color
display.drawXBitmap(0, 0, apples_black_bits, apples_black_width, apples_black_height, BLACK);
display.drawXBitmap(0, 0, apples_red_bits, apples_red_width, apples_red_height, RED);
Expand Down
4 changes: 2 additions & 2 deletions src/Displays/QYEG0213RWS800/QYEG0213RWS800.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ class QYEG0213RWS800 : public BaseDisplay {
public:

// UNO-style constructor
QYEG0213RWS800( uint8_t pin_dc, uint8_t pin_cs, uint8_t pin_busy, uint16_t page_height = DEFAULT_PAGE_HEIGHT)
QYEG0213RWS800( uint8_t pin_dc, uint8_t pin_cs, uint8_t pin_busy, uint16_t page_height = 50) // Enable paging, 3 Colors takes too much RAM
: BaseDisplay ( pin_dc, pin_cs, pin_busy, DEFAULT_SDI, DEFAULT_CLK, page_height)
{ init(); }

// Full pinout constructor
#if CAN_SPECIFY_SPI_PINS
QYEG0213RWS800( uint8_t pin_dc, uint8_t pin_cs, uint8_t pin_busy, uint8_t pin_sdi, uint8_t pin_clk, uint16_t page_height = DEFAULT_PAGE_HEIGHT)
QYEG0213RWS800( uint8_t pin_dc, uint8_t pin_cs, uint8_t pin_busy, uint8_t pin_sdi, uint8_t pin_clk, uint16_t page_height = 50) // Enable paging, 3 Colors takes too much RAM
: BaseDisplay ( pin_dc, pin_cs, pin_busy, pin_sdi, pin_clk, page_height)
{ init(); }

Expand Down

0 comments on commit a8f817d

Please sign in to comment.