GithubHelp home page GithubHelp logo

tqthong0911 / max7219ledmatrix Goto Github PK

View Code? Open in Web Editor NEW

This project forked from squix78/max7219ledmatrix

0.0 2.0 0.0 150 KB

Library for the ESP8266 on Arduino IDE displaying text on multiple 8x8 led matrices

License: MIT License

C++ 33.77% Objective-C 66.23%

max7219ledmatrix's Introduction

MAX7219LedMatrix

Library for the ESP8266 on Arduino IDE displaying text on one or multiple MAX7219 8x8 led matrices.

This library displays text and sets specific pixels on one or multiple 8x8 led matrices with a MAX7219 driver chip controlled through the SPI interface. These modules are relatively cheep and can be daisy chained which makes it easy to get a led text bar up and running You can find modules e.g. with Banggood (<-affiliate link).

For details about the MAX7219 theory, wiring, schematic, etc. there's a great post by Nick Gammon: http://www.gammon.com.au/forum/?id=11516

Currently this library supports the following operations:

  • set pixels
  • write text with a simple font
  • scroll text left or right
  • oscillate text between the two ends

You're welcome to read in my blog how this library came about.

Example

#include <SPI.h>
#include "LedMatrix.h"

#define NUMBER_OF_DEVICES 1
#define CS_PIN 2
LedMatrix ledMatrix = LedMatrix(NUMBER_OF_DEVICES, CS_PIN);

void setup() {
  Serial.begin(115200); // For debugging output
  ledMatrix.init();
  ledMatrix.setIntensity(4); // range is 0-15
  ledMatrix.setText("MAX7219 Demo");
}

void loop() {
  ledMatrix.clear();
  ledMatrix.scrollTextLeft();
  ledMatrix.drawText();
  ledMatrix.commit(); // commit transfers the byte buffer to the displays
  delay(200);
}

Installing library in Arduino IDE

  • open Arduino IDE
  • open preferences and take note of the 'Sketchbook location' path
  • navigate into the libraries sub folder at that path (e.g. with terminal)
  • clone this Git repository into that folder
  • restart Arduino IDE
  • you should now find the MAX7219LedMatrix library in Sketch > Include Library

Connecting the module(s) to the ESP8266

LED Matrix ESP8266
VCC +3.3V
GND GND
DIN GPIO13 (HSPID)
CS Choose free GPIO, e.g. GPIO2
CLK GPIO14 (HSPICLK)

max7219ledmatrix's People

Contributors

squix78 avatar marcelstoer avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.