-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Description
Subject of the issue
Hi, it's possible for me to turn the display on and of, show the colon or dot. But if I try to print a alphanum the only thing that shows up is a fully enlightened position.
Your workbench
- Arduino Nano every
- Qwiic Alphanumeric Display - Purple
- 5v, ground, SDA, SCL
- PC USB port
- Nope
Steps to reproduce
#include <Wire.h>
#include <SparkFun_Alphanumeric_Display.h>
HT16K33 display;
const int button_pin = 11;
const int relay_pin = 12;
int relay_state = 1;
int button_state = 1;
int last_button_state = HIGH;
unsigned long last_debounce_time = 0;
unsigned long debounce_delay = 50;
void setup(){
Serial.begin(9600);
Serial.println("Qwiic Alphanumeric examples");
Wire.begin();
if (display.begin() == false) {
Serial.println("Device did not acknowledge! Freezing.");
while(1);
}
Serial.println("Display acknowledged.");
display.setBrightness(0.1);
display.write("asdf");
display.updateDisplay();
pinMode(relay_pin, OUTPUT);
pinMode(button_pin, INPUT);
digitalWrite(relay_pin, 1);
}
void loop() {
int reading = digitalRead(button_pin);
if (reading != last_button_state) {
// reset the debouncing timer
last_debounce_time = millis();
}
if ((millis() - last_debounce_time) > debounce_delay) {
if (reading != button_state) {
button_state = reading;
if (button_state == HIGH) {
relay_state = !relay_state;
if (relay_state == 1) {
display.displayOff();
} else {
display.displayOn();
}
}
}
}
digitalWrite(relay_pin, relay_state);
last_button_state = reading;
}
Expected behavior
The text "asdf" shows up
Actual behavior
All segments are lighted up
Metadata
Metadata
Assignees
Labels
No labels