Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with Circuit Playground Express board and 152x152 Tri-Color E-Ink Gizmo #178

Open
ncmikkelsen opened this issue Feb 14, 2023 · 0 comments

Comments

@ncmikkelsen
Copy link

  • Arduino board: Adafruit Circuit Playground Express
  • Arduino IDE version (found in Arduino -> About Arduino menu): 2.0.3

GizmoTest.ino example from Adafruit EPD library does not result in any graphics on the display. I only receive the prints in the serial monitor.
Posting this as an issue here as directed in the below linked adafruit thread. Please let me know if there is a more suitable place for the issue.

Steps to reproduce:

  • Attach 152x152 Tri-Color E-Ink Gizmo to Circuit Playground Express boards with provied screws
  • Install libraries and board package as instructed in the adafruit guide linked below.
  • Upload GizmoTest.ino from Examples -> Adafruit EPD

Here is the code (note that I have uncommented the line selecting the correct chipset for the display):

/***************************************************
  Adafruit invests time and resources providing this open source code,
  please support Adafruit and open-source hardware by purchasing
  products from Adafruit!

  Written by Limor Fried/Ladyada for Adafruit Industries.
  MIT license, all text above must be included in any redistribution
 ****************************************************/

#include "Adafruit_ThinkInk.h"

#define EPD_CS      0
#define EPD_DC      1
#define SRAM_CS     -1
#define EPD_RESET   PIN_A3 // can set to -1 and share with microcontroller Reset!
#define EPD_BUSY    -1 // can set to -1 to not use a pin (will wait a fixed delay)

// You will need to use Adafruit's CircuitPlayground Express Board Definition
// for Gizmos rather than the Arduino version since there are additional SPI
// ports exposed.
#if (SPI_INTERFACES_COUNT == 1)
  SPIClass* spi = &SPI;
#else
  SPIClass* spi = &SPI1;
#endif

// 1.54" 152x152 Tricolor EPD with ILI0373 chipset
ThinkInk_154_Tricolor_Z17 display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);
// 1.54" 200x200 Tricolor EPD with SSD1681 chipset
//ThinkInk_154_Tricolor_Z90 display(EPD_DC, EPD_RESET, EPD_CS, SRAM_CS, EPD_BUSY);

float p = 3.1415926;

void setup(void) {
  Serial.begin(115200);
  Serial.print("Hello! EPD Gizmo Test");

  display.begin(THINKINK_TRICOLOR);
  
  Serial.println("Initialized");
}

void loop() {
  Serial.println("Banner demo");
  display.clearBuffer();
  display.setTextSize(3);
  display.setCursor((display.width() - 144)/2, (display.height() - 24)/2);
  display.setTextColor(EPD_BLACK);
  display.print("Tri");  
  display.setTextColor(EPD_RED);
  display.print("Color");  
  display.display();

  delay(15000);
  
  Serial.println("Color rectangle demo");
  display.clearBuffer();
  display.fillRect(display.width()/3, 0, display.width()/3, display.height(), EPD_BLACK);
  display.fillRect((display.width()*2)/3, 0, display.width()/3, display.height(), EPD_RED);
  display.display();

  delay(15000);
  
  Serial.println("Text demo");
  // large block of text
  display.clearBuffer();
  display.setTextSize(1);
  testdrawtext("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur adipiscing ante sed nibh tincidunt feugiat. Maecenas enim massa, fringilla sed malesuada et, malesuada sit amet turpis. Sed porttitor neque ut ante pretium vitae malesuada nunc bibendum. Nullam aliquet ultrices massa eu hendrerit. Ut sed nisi lorem. In vestibulum purus a tortor imperdiet posuere. ", EPD_BLACK);
  display.display();

  delay(15000);

  display.clearBuffer();
  for (int16_t i=0; i<display.width(); i+=4) {
    display.drawLine(0, 0, i, display.height()-1, EPD_BLACK);
  }

  for (int16_t i=0; i<display.height(); i+=4) {
    display.drawLine(display.width()-1, 0, 0, i, EPD_RED);
  }
  display.display();

  delay(15000);  
}


void testdrawtext(const char *text, uint16_t color) {
  display.setCursor(0, 0);
  display.setTextColor(color);
  display.setTextWrap(true);
  display.print(text);
}

I have followed the guide provided by adafruit here: https://learn.adafruit.com/adafruit-circuit-playground-tri-color-e-ink-gizmo/arduino-code
And debugged in the adafruit forum which can be found here: https://forums.adafruit.com/viewtopic.php?t=173038
As mentioned in the forum thread I have tried with two different gizmos with two different, known working, circuit playground express boards. The thread is over a year old but I have tried the example and the suggested steps again today, with no result.
I am using the Adafruit Circuit Playground Express board from the Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards package.

The same gizmo and express board is working with the circuitpython from the adafruit guide: https://learn.adafruit.com/adafruit-circuit-playground-tri-color-e-ink-gizmo/circuitpython

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant