Whatever your project does, some data have to be presented. If you want to display text on modules containing 7-segment displays which are desined to show numeric data, also many characters can be shown. As most messages exceed the number of available digits, you have to apply the ticker mode. With just a few lines of code this can be done:
#include <TM1638.h>
byte data = 11;
byte clock = 12;
byte strobe = 13;
TM1638 m(data, clock, strobe);
const char b[] = "LAuFSCHrIFT on ArduIno ";
const byte l = strlen(b);
char e[l];
byte i;
void setup() {
m.clearDisplay();
for (i = 0; i < l; i++) {
int c = b[i] - 32;
int d = FONT_DEFAULT[c];
e[i] = d;
}
}
void loop() {
m.setDisplay(&e[i], 8);
if (++i > l - 8) i = 0;
delay(300);
}
Some characters look very ugly on 7-segment display that is why you want to select lower-case letters and try to avoid words containing "M" and "W". Therefore I chose "Laufschrift" instead of "Ticker".
The hardware connections can be done easily using the ISCP port located at the right hand side of the Arduino UNO, provided you do not use any SPI devices:
Just use five female-to-female jumper-wires.
Comments