Back to Step by Step Course by Robojax

Lesson 23: Using MAX7219 8 Digit Display | Arduino Step by Step Course

Related or required files and link to this lesson

Part 2: LCD, LED and OLED Screens

In this lecture we learn how to use MAX7219 8 digits LED Display to display number and make a counter.


  /* 
 * Robojax Arduino Step By Step Course
 * Lesson 23,  MAX7219 8 digit LED display 
 *  8 Digits LED Seven Segment Display Module based on MAX7219 using Arduino IDE
 *  
   Please watch video instruction here https://youtu.be/8znr77ScydM
 This code is available at http://robojax.com/course1/?vid=lecture11
 
with over 100 lectures Free On  YouTube Watch it here http://robojax.com/L/?id=338
Get the code for the course: http://robojax.com/L/?id=339  
 *  updated by Ahmad Shamshiri for Robojax 
 *  On Monday Sep 16, 2019 in Ajax, Ontario, Canada
 *  You can get this code from Robojax.com
 *  
 *  Original Libary source: https://github.com/ozhantr/DigitLedDisplay


If you found this tutorial helpful, please support me so I can continue creating 
 make donation using PayPal http://robojax.com/L/?id=64

 * Code is available at http://robojax.com/learn/arduino

 * This code is "AS IS" without warranty or liability. Free to be used as long as you keep this note intact.* 
 * This code has been download from Robojax.com
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>. 
    

 */
#include "DigitLedDisplay.h"

/* Arduino Pin to Display Pin
   7 to DIN,
   6 to CS,
   5 to CLK */
#define DIN 5
#define CS 6
#define CLK 7   
DigitLedDisplay ld = DigitLedDisplay(DIN, CS, CLK);


void setup() {
//Robojax Arduino Step By Step Course http://robojax.com/L/?id=338
  /* Set the brightness min:1, max:15 */
  ld.setBright(6);

  /* Set the digit count */
  ld.setDigitLimit(8);

}

void loop() {

 //Robojax Arduino Step By Step Course http://robojax.com/L/?id=338

  /* Prints data to the display */
  ld.printDigit(12345678); 
  delay(3000);
  ld.clear();

  ld.printDigit(22222222);
  delay(500);
  ld.clear();

  ld.printDigit(44444444);
  delay(500);
  ld.clear();

  for (int i = 0; i < 100; i++) {
    ld.printDigit(i);

    /* Start From Digit 4 */
    ld.printDigit(i, 4);
    delay(50);

    
  }

  for (int i = 0; i <= 10; i++) {
    /* Display off */
    ld.off();
    delay(150);

    /* Display on */
    ld.on();
    delay(150);
  }

  /* Clear all display value */
  ld.clear();
  delay(500);

  for (long i = 0; i < 100; i++) {
    ld.printDigit(i);
    delay(25);
  }

  for (int i = 0; i <= 20; i++) {
    /* Select Digit 5 and write B01100011 */
    ld.write(5, B01100011);
    delay(200);

    /* Select Digit 5 and write B00011101 */
    ld.write(5, B00011101);
    delay(200);
  }

  /* Clear all display value */
  ld.clear();
  delay(500);

  ld.printDigit(2019, 3);
  delay(4000);

}// loop ends


   

The least I expect from you is to give the video a thumbs up and subscribe to my channel. I appreciate it. I have spent hundreds of hours making these lectures and writing code. You don't lose anything by subscribing to my channel. Your subscription is a stamp of approval for my videos, helping more people find them and, in turn, helping me. Thank you!

If you found this tutorial helpful, please support me so I can continue creating content like this. support me via PayPal

**** AFFILIATE PROGRAM **** We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.

Right Side
footer