GithubHelp home page GithubHelp logo

seeed-studio / seeed_arduino_ultrathinledmatrix Goto Github PK

View Code? Open in Web Editor NEW
50.0 26.0 27.0 20 KB

an Ultrathin 32x16 LED matrix Arduino library

Home Page: http://goo.gl/y6VnO6

License: MIT License

C++ 100.00%
arduino 74hc138 arduino-library

seeed_arduino_ultrathinledmatrix's Introduction

Ultrathin LED Matrix Library

This is an Arduino library for Ultrathin 32x16 LED Matrix.

Ultrathin 32x16 LED Matrix

Several panels can be combined together as a large screen.

Coordinate & Connection (Arduino -> panel 0 -> panel 1 -> ...)
  (0, 0)                                     (0, 0)
    +--------+--------+--------+               +--------+--------+
    |   5    |    4   |    3   |               |    1   |    0   |
    |        |        |        |               |        |        |<----- Arduino
    +--------+--------+--------+               +--------+--------+
    |   2    |    1   |    0   |                              (64, 16)
    |        |        |        |<----- Arduino
    +--------+--------+--------+
                            (96, 32)

Pins

  • A, B, C, D - line select for two 74HC138
  • OE - Ouput Enable(active low) for 74HC595
  • STB - data latch for 74HC595
  • CLK - shift register clock input for 74HC595

If you use the LED matrix with mbed platform, another library is for you.

Usage

#include "LEDMatrix.h"

#define WIDTH   32
#define HEIGHT  16

LEDMatrix matrix(4, 5, 6, 7, 8, 9, 10, 11);		// LEDMatrix(a, b, c, d, oe, r1, stb, clk);
uint8_t displaybuf[WIDTH *HEIGHT / 8]; 			// Display Buffer

void setup() {
    matrix.begin(displaybuf, WIDTH, HEIGHT);
}

void loop() {
    static uint32_t lastCountTime = 0;
    static uint8_t count = 0;

    matrix.scan();

    if ((millis() - lastCountTime) > 3000) {
        lastCountTime = millis();
        matrix.drawRect(count + 4, count, 28 - count, 16 - count, 1 - (count & 1));
        count = (count + 1) & 0x0F;
    }
}


This library is written by Yihui Xiong for seeed studio
and is licensed under The MIT License.

Contributing to this software is warmly welcomed. You can do this basically by
forking, committing modifications and then pulling requests (follow the links above
for operating guide). Adding change log and your contact into file header is encouraged.
Thanks for your contribution.

Seeed Studio is an open hardware facilitation company based in Shenzhen, China.
Benefiting from local manufacture power and convenient global logistic system,
we integrate resources to serve new era of innovation. Seeed also works with
global distributors and partners to push open hardware movement.

Analytics

seeed_arduino_ultrathinledmatrix's People

Contributors

cyberman54 avatar killingjacky avatar pillar1989 avatar turmary avatar xiongyihui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

seeed_arduino_ultrathinledmatrix's Issues

Possible bug in scan() method

Hi,
I only have one matrix, so I mot able to test this, but reading the code of the scan() method I think there is a small bug.
This method first assigns ptr and then updates the head pointer:

    uint8_t *ptr = head;
    head += line * width * 2;

Looking at the code I think that head should be computed before assigning it to ptr:

    head += line * width * 2;
    uint8_t *ptr = head;

Sorry if I am wrong, but I cannot test it (with just one matrix, the order does not matter since this loop/code is only executed once.

drawImage not working

Hi!

I have been trying to get the drawImage working and have yet to get it to do anything. The examples that come with the library don't actually seem to use anything from the library (other than to setup the screen). Is there any chance of some demo code that uses all of the commands?

Just as a thought, are there any plans to include printing characters? I was thinking 5x3, 7x5, 6x16 etc?

Many thanks and thank you for your time reading this ๐Ÿ˜

Document LEDMatrix(a, b, c, d, oe, r1, stb, clk);

Hi,

can you add comments to what each of the parameters are in LEDMatrix, please?

LEDMatrix(a, b, c, d, oe, r1, stb, clk)

That is fairly cryptic on what each parameter (and associated pin) function is.
The only less cryptic is clk. But, still I'd like to know to what are the requirements for each pin & associated parameter.

Thx for contributing this library.

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.