Go Down

Topic: List of Names on SURE 3208 DOT MATRIX DISPLAY (Read 113 times) previous topic - next topic


Good morning all,

I want to display a list of names on the sure 3208 but I dont know a cleaner way either then doing this messy line, in the code below. Can anyone of you can guide me on how to do a cleaner way please?

HT1632.drawText("Angelo          Chris          Marie          Joseph          Josianne          Samuel          Haiden          Malta          Gozo",

Code: [Select]
#include <font_5x4.h>
#include <HT1632.h>
#include <images.h>

int i = 0;
int wd;

void setup () {
 // Setup and begin the matrix
 // HT1632.begin(CS1,WR,DATA)
 HT1632.begin( 9, 10, 11);
 // Give the width, in columns, of the assigned string
 // FONT_5x4_WIDTH and FONT_5x4_HEIGHT are parameter specified in the "font_5x4.h" file
 wd = HT1632.getTextWidth("Angelo          Chris          Marie          Joseph          Josianne          Samuel          Haiden          Malta          Gozo", FONT_5X4_WIDTH, FONT_5X4_HEIGHT);

void loop () {
 // Font rendering example
 HT1632.drawText("Angelo          Chris          Marie          Joseph          Josianne          Samuel          Haiden          Malta          Gozo", 2*OUT_SIZE - i, 2, FONT_5X4, FONT_5X4_WIDTH, FONT_5X4_HEIGHT, FONT_5X4_STEP_GLYPH);
 i = (i+1)%(wd + OUT_SIZE * 2);  

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131