Arduino_Scuola
Published © GPL3+

Interfacing Arduino UNO with SURE Electronics LED Dot Matrix

This tutorial shows you an easier way to control an LED dot Matrix from an Arduino board.

IntermediateFull instructions provided19 minutes7,834
Interfacing Arduino UNO with SURE Electronics LED Dot Matrix

Things used in this project

Story

Read more

Code

Code snippet #1

Arduino
#include "ht1632c.h"
#include "font1.h"
#include <Wire.h>
#include <avr/pgmspace.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("Hello, how are you?", FONT_5X4_WIDTH, FONT_5X4_HEIGHT);
}

void loop () {
  
  // Font rendering example
  HT1632.drawTarget(BUFFER_BOARD(1));
  HT1632.clear();
  HT1632.drawText("Hello, how are you?", 2*OUT_SIZE - i, 2, FONT_5X4, FONT_5X4_WIDTH, FONT_5X4_HEIGHT, FONT_5X4_STEP_GLYPH);
  HT1632.render();  
  
  i = (i+1)%(wd + OUT_SIZE * 2);  
  delay(200);
}

Github

https://github.com/gauravmm/HT1632-for-Arduino

Credits

Arduino_Scuola

Arduino_Scuola

32 projects • 155 followers

Comments