Fotos auf 64x32 LED Matrix

Mittels eines Arduino Megas kannst du einzelne Fotos auf einer LED Matrix anzeigen lassen. Lerne in dieser Schritt für Schritt Anleitung, wie du die Matrix anschließen musst und wie die Bilder auf den Arduino kommen.

// colorwheel_progmem demo for Adafruit RGBmatrixPanel library.
// Renders a nice circle of hues on our 32x32 RGB LED matrix:
// http://www.adafruit.com/products/607

// This version uses precomputed image data stored in PROGMEM
// rather than calculating each pixel.  Nearly instantaneous!  Woo!

// Written by Limor Fried/Ladyada & Phil Burgess/PaintYourDragon
// for Adafruit Industries.
// BSD license, all text above must be included in any redistribution.

#include <Adafruit_GFX.h>   // Core graphics library
#include <RGBmatrixPanel.h> // Hardware-specific library
#include "images.h"

// 32x64 LED-Matrix Connections
#define OE   9
#define LAT 10
#define CLK 11
#define A   A0
#define B   A1
#define C   A2
#define D   A3

RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, false, 64);

void setup() {
  int     i, len;
  uint8_t *ptr = matrix.backBuffer(); // Get address of matrix data

  // Copy image from PROGMEM to matrix buffer:
  //memcpy_P(ptr, iceland, sizeof(iceland));

  // Start up matrix AFTER data is copied.  The RGBmatrixPanel
  // interrupt code ties up about 40% of the CPU time, so starting
  // it now allows the prior drawing code to run even faster!
  matrix.begin();

  while(1){
    //memcpy_P(ptr, img1, sizeof(img1)); // Island, Berg, blaue Lagune
    //delay(4000);
    memcpy_P(ptr, img2, sizeof(img2)); // Rechstag Kuppel
    delay(4000);
    //memcpy_P(ptr, img3, sizeof(img3)); // Testbild mit Farbverlauf
    //delay(4000);
    memcpy_P(ptr, img4, sizeof(img4)); // London, Themse, Lonon Eye
    delay(4000);
    memcpy_P(ptr, img5, sizeof(img5)); // Notausgang-Schild
    delay(4000);
    memcpy_P(ptr, img6, sizeof(img6)); // Fablab Logo
    delay(4000);
    memcpy_P(ptr, img7, sizeof(img7)); // Brandenburger Tor
    delay(4000);
    memcpy_P(ptr, img8, sizeof(img8)); // British Museum
    delay(4000);
    memcpy_P(ptr, img9, sizeof(img9)); // Big Ben, London
    delay(4000);
    //memcpy_P(ptr, img10, sizeof(img10)); // 3D-Drucker mit Zuckerguss
    //delay(4000);
    //memcpy_P(ptr, img11, sizeof(img11)); // Roboter
    //delay(4000);
    //memcpy_P(ptr, img12, sizeof(img12)); // Alpspitze, Blick auf Zugspitze
    //delay(4000);
    //memcpy_P(ptr, img13, sizeof(img13)); // Insbruck Klettersteig
    //delay(4000);
    //memcpy_P(ptr, img14, sizeof(img14)); // Sonnenaufgang zwischen Neuses und Kriegenbrunn
    //delay(4000);
    memcpy_P(ptr, img15, sizeof(img15)); // Eisenbahnbrücke Berlin
    delay(4000);
    //memcpy_P(ptr, img16, sizeof(img16)); // Regensburg, FLusslandschaft
    //delay(4000);
    memcpy_P(ptr, img17, sizeof(img17)); // Tower-Bridge London
    delay(4000);
    memcpy_P(ptr, img18, sizeof(img18)); // Sonnenuntergang (Israel)
    delay(4000);
    memcpy_P(ptr, img19, sizeof(img19)); // Fußball-Roboter (Make-Munich 2016)
    delay(4000);
    memcpy_P(ptr, img20, sizeof(img20)); // Sava-Kathedrale (Belgrad)
    delay(4000);
    memcpy_P(ptr, img21, sizeof(img21)); // Luftfahrt-Museum (Belgrad)
    delay(4000);
    memcpy_P(ptr, img22, sizeof(img22)); // Sonnenuntergang (Niederndorf)
    delay(4000);
    memcpy_P(ptr, img23, sizeof(img23)); // Eifelturm Paris
    delay(4000);
  }
}

void loop() {
  // do nothing
}


Weitere Artikel

© Veit Götz 2012 - 2025
Impressum
Datenschutz
Statistiken
Spenden