User Tools

Site Tools


matrice_de_led_16x32_seeed

This is an old revision of the document!


constitution

note : fonctionnement par ligne.

librairie

Propriétés

typeidentifiantusage
private
uint8_tclk, r1, stb, oe, a, b, c, dpins
uint8_t[]*displaybufbuffer
uint16_twidth, heighttaille du panneau
uint8_tmask?
uint8_tstateon/off (0/1)
public

Méthodes

identifiantparamètresusage
LEDMatrixa, b, c, d, oe, r1, stb, clkconstructeur
begin*displaybuf, width, heightinitialisation ?
drawPointx, y, pixelpermet d'allumer/éteindre un pixel à une position x,y. pixel = 0/1 (allumé/éteint)
drawRectx1, y1, x2, y2, pixel)dessine un rectangle. pixel : cf ci-dessus.
drawImagexoffset, yoffset, width, height, *imagedessine une image. *image = ?
clear “turn off 1/16 leds and turn on another 1/16 leds” ?
scan ?
reverse inverse les pixels allumés et éteints
isReversed retourne la valeur de mask
on turn on the led matrix ?
off turn off the led matrix ?

Code minimal (proposition)

Nécéssite les librairies appropriées

#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
int frequency= 1000;

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

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

    matrix.scan();

    if ((millis() - lastCountTime) > frequency) {
        lastCountTime = millis();
        // votre code ici
    }
}
matrice_de_led_16x32_seeed.1427973464.txt.gz · Last modified: 2015/04/02 13:17 by 86.73.246.210