Skip to content

printChar() and other functions don't work with shiftLeft() and shiftRight() #27

Open
@sfe-SparkFro

Description

@sfe-SparkFro

Creating an issue for #26

Replication code (mashup of examples 3 and 9):

#include <Wire.h>

#include <SparkFun_Alphanumeric_Display.h>  //Click here to get the library: http://librarymanager/All#SparkFun_Qwiic_Alphanumeric_Display by SparkFun
HT16K33 display;

void setup()
{
  Serial.begin(115200);
  Serial.println("SparkFun Qwiic Alphanumeric - Example 3: Print Character");
  Wire.begin(); //Join I2C bus

  //check if display will acknowledge
  if (display.begin() == false)
  {
    Serial.println("Device did not acknowledge! Freezing.");
    while(1);
  }
  Serial.println("Display acknowledged.");

  display.printChar('W', 0);
  display.printChar('H', 1);
  display.printChar('A', 2);
  display.printChar('T', 3);

  display.updateDisplay();
}

void loop(){
  delay(300);
  display.shiftLeft();
}

Before this change, the text disappears when display.shiftLeft() is called. After this change, it shifts like expected.

Should double check all other functions to ensure displayContent is being handled correctly everywhere. For example, clear() does not wipe displayContent, so adding the following to the end of begin() has unexpected results (the text magically comes back!):

delay(500);
display.clear();

After fixing here, should copy the changes to https://github.com/sparkfun/qwiic_alphanumeric_py if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions