I have this HT16K33 4 Digit 14-segment display I got brand new. I connected it to my Arduino UNO, wired it up and uploaded some quick test code. However, the display looks completely broken (see image below), only some segments turn on.
I soldered the connection pins to the HT16K33 board (see picture below). My solder isn't the best but it also shouldn't be too bad.
I did a quick resistance check on the connection pins to see if the pins were soldered correctly, and they seemed good. I'm not too sure how to test the ji2c pin though...
Here is the Wiring on my breadboard:
Finally here is the code i'm currently using:
#include "HT16K33.h"
#include <Wire.h>
HT16K33 seg(0x070);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Wire.begin();
if(!seg.begin()){
Serial.println("ERROR");
while(1);
}
Wire.setClock(100000);
Serial.println("displayTest()");
seg.displayOff();
delay(1000);
seg.displayOn();
seg.displayClear();
seg.displayInt(5);
}
void loop() {
// put your main code here, to run repeatedly:
}
I'm a bit troubled here and confused at what's going on... Help would be greatly appreciated
1 Answer 1
so @6v6gt's comment made me re-search for a library for a 14-segment HT16K33. It seems he/she was in the money since it started working after switching library. While I couldn't find any yesterday, I found this page today which covers 7-segment and 14-segment HT16K33: https://learn.adafruit.com/adafruit-led-backpack/0-54-alphanumeric?view=all#library-reference-3052482
So I switched from the HT16K33 library to the "Adafruit_LEDBackpack" and "Adafruit_GFX" Libraries.
Code for those wondering:
#include <Wire.h>
#include <Adafruit_GFX.h>
#include "Adafruit_LEDBackpack.h"
Adafruit_AlphaNum4 alpha4 = Adafruit_AlphaNum4();
void setup() {
Serial.begin(9600);
alpha4.begin(0x70); // pass in the address
alpha4.writeDigitAscii(0, 'A');
alpha4.writeDigitAscii(1, 'B');
alpha4.writeDigitAscii(2, 'C');
alpha4.writeDigitAscii(3, 'D');
alpha4.writeDisplay();
}
void loop() {
}
One question I have is (which is an entirely different subject), how do I go from here to rotate the letters and alphabet 180 degrees?
-
To create custom characters, just to get you started, look here: github.com/adafruit/Adafruit_LED_Backpack/blob/master/… . You'll see an array
static const PROGMEM uint16_t alphafonttable[]
. Make a local copy of the library and try changing the binary value marked say 'A' and see what happens.6v6gt– 6v6gt2022年10月12日 23:42:50 +00:00Commented Oct 12, 2022 at 23:42
displayInt()
?