"Dot Matrix Application": Basic Arduino Programming

in #utopian-io7 years ago (edited)

What Will I Learn?

After reading this tutorial

▶You will learn how to program dot matrix display using Arduino Microcontroller

▶You will learn how to construct the circuit of dot matrix application using fritzing

▶You will learn how to cascade 2 or more dot matrix display

Requirements

  • Arduino UNO
  • Breadboard
  • 8 by 8 Dpt Matrix display with MAX7219 driver
  • Fritzing ( Be sure to be well-oriented interms of using this sorftware application)

Brief discussion of the following materials used:

Arduino -- is a kind of microcontroller kit for building digital devices and interactive objects that can sense and control object in the physical world. It is also an open source computer hadware and software company use for desugning automated projects.
Dot Matrix -- is a display device used to display information on machines, clocks, railway departure indicators and many other devices requiring a simple display device of limited resolution.
Breadboard -- it is used for testing circuits before applyig to the real world. Or a device for temporary circuit making and designing.

Difficulty

  • Basic

Description

What is a Dot Matrix⁉

20180313_094326.jpg

Most of the technologies nowadays use matrices to emphasize the display of information. These includes: cellphones, computers, printers, television and other technologies that displays information beyond its structure.

Dot matrices were common to everyone since we can see it anywhere in our community but not all are knowledgeable enough on how to program an arduino to diaplay the information on this particular device. People got amazed directly after seeing the animated display of the programmed featured on the matrices.

Somehow, the world were ignited by means of matrices. For us to be acquainted, I made this tutorial in order to give any knowledge about overcoming Dot Matrix applications. Infact it is also good for business industry.

Step by Step discussion of the process

Part I.

We will construct first our circuit design using fritzing software application.

dot 1.png

First, open your fritzing application in your computer.

dot 2.png

Then, after you openned the application click on the breadboard to come up on an actual designing of your desired circuit.

dot 3.png

Next, after moving your way to the circuit designing you need to gather all the components you will be using inorder to start you designing. At the image, I have there the Arduino UNO, 8 by 8 DOT Matrix display, and the Breadboard.

dot 4.png

Since we will be using 3 dot matrix display cascaded with each other. We will just duplicate our dot matrix component by simply right clicking your mouse. Then, click duplicate.

dot 5.png

After we were done gathering our components let us now start positioning it to its proper designated area wherein you can now apply wirings.

dot 6.png

Lastly, apply now wirings in your components to start with your designing of the circuit.

  • Connect the pin 1 (Vcc) of the dot matrix driver into the 5V supply of the Arduino.
  • Also connect the pin 2 (Gnd) of the dot matrix driver to the Ground of the Arduino.
  • Then, connect the pin 3 (DIN) of the driver to the pin 12 of the Arduino microcontroller.
  • After, connect the pin 4 (CS) of the driver to the pin 10 of the Arduino.
  • Connect the pin 5 (CLK) of the driver to the pin 11 of the Arduino.

How to cascade dot matrices

By simply connecting the 5 output pins of the first dot matrix display to the 5 input pins of the another dot matrix display that follows and so on and so forth.

Note: The more number of dot matrix displays, the better the output of your project.

Part II.

Encoding of program into your Arduino Microcontroller.

Here is the code for this project tutorial.

#include "LedControlMS.h"

#define NBR_MTX 4
LedControl lc=LedControl(12,11,10, NBR_MTX);

String scrollString= "STEEMIT - MORBYJOHN ";
int stringLength=scrollString.length();
char ch0, ch1, ch2, ch3;
int nextCharIndex=0;


void setup() {
 
  Serial.begin (9600);
  Serial.println("Setup");
  Serial.println(scrollString);
  Serial.println(stringLength);

  for (int i=0; i< NBR_MTX; i++){
    lc.shutdown(i,false);
  
    lc.setIntensity(i,1);
  
    lc.clearDisplay(i);
  }
  delay(100);
  lc.clearAll();
  ch0= scrollString[0];
  ch1= scrollString[1];
  ch2= scrollString[2];
  ch3= scrollString[3];
  nextCharIndex=4;
}

void loop(){
  lc.displayChar(0, lc.getCharArrayPosition(ch0));
  lc.displayChar(1, lc.getCharArrayPosition(ch1));
  lc.displayChar(2, lc.getCharArrayPosition(ch2));
  lc.displayChar(3, lc.getCharArrayPosition(ch3));
  ch0=ch1;
  ch1=ch2;
  ch2=ch3;
  ch3=scrollString[nextCharIndex++];
  if (nextCharIndex>=stringLength) nextCharIndex=0;
  delay(300);
  lc.clearAll();
  delay(25);
}

Let us define the function of the codes encoded in our ArduinoDroid Application.

#include "LedControlMS.h"
The function of this line is to include the library for operating the dot matrix display into your arduino microcontroller.
#define NBR_MTX 3
LedControl lc=LedControl(12,11,10, NBR_MTX);
This code commands the arduino to input the number of dot matrix display you are using. I encoded there 3 because I am using 3 dot matrix display for this project.
String scrollString= "STEEMIT - MORBYJOHN ";
This line here tells the Arduino what information to be displayed

If you haven't own any copy of its library. Click here to download.

  • You must have a .zip folder in your downloads
  • Unzip the .zip folder ▶Led Control Master folder
  • Rename the folder to LedControl
  • LedControl ▶Arduino IDE libraries
  • re-Open your Arduino IDE

For my actual project I have this video below to show you the proper function of my project.

Curriculum

This is my second tutorial about Arduino programming



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Your contribution cannot be approved because it does not follow the Utopian Rules.

Violated Rules:

  • Tutorials must be technical instructions that teach non-trivial aspects of an Open Source project.

  • Same contributions will never be accepted in Utopian twice by the same or different user.

  • Design or video editing related tutorials, gameplay, simple on-screen instructions, ubiquitous functions (Save, Open, Print, etc.) or basic programming concepts (variables, operators, loops, etc.) will not be accepted.

My Opinion:

  • A tutorial must be informative and explanatory, but also "tutor". This tutorial does "tutor", but shows the same concept with other Arduino tutorials but just with different variables. A user can easily read other posts and alter it to match his/her needs.

  • In short, half of your post is same with other Arduino tutorials. And the other half isn't technical. Everything you have shown here can be easily read from documentation of the module. So, next time, instead of showing function of the module, show something which isn't included in the module but can be teached to the user.

  • Also, there is another tutorial related to Arduino Matrix. Rules were different, it got an approval. But I wouldn't approve if it was published nowadays. But still, there is a tutorial and yours is not better than it.

Here is the link:

https://utopian.io/utopian-io/@pakganern/led-matrix-red-8x8-tutorial

You can contact us on Discord.

[utopian-moderator]

Congratulations! This post has been upvoted by SteemMakers. We are a community based project that aims to support makers and DIYers on the blockchain in every way possible. Find out more about us on our website: www.steemmakers.com.

If you like our work, please consider upvoting this comment to support the growth of our community. Thank you.

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63316.74
ETH 2581.53
USDT 1.00
SBD 2.79