Bewegungen mit 16x16 LED Matrix am Arduino UNO
In diesem Beitrag möchte ich dir zeigen, wie du einfache Bewegungen auf einer 16x16 LED Matrix mit dem Arduino UNO programmierst.
Bewegungen mit 16x16 LED Matrix am Arduino UNO
Im letzten Beitrag zur hier verwendeten LED Matrix habe ich dir bereits gezeigt, wie diese an den Arduino UNO angeschlossen und programmiert wird.
Hier soll es nun darum gehen, wie du einfache Bewegungen auf der Matrix anzeigst.
Vorweg, richtige Videos werden sich auf der Matrix nicht anzeigen lassen. Aber man kann mit meinem Generator kleine "Daumenkino" Bilder erzeugen, welche mit dem richtigen Intervall in Bewegung umgesetzt werden können.
Benötigte Ressourcen für den Aufbau
Um die nachfolgenden Beispiele nachzubauen, benötigst du:
- einen Mikrocontroller Bsp Arduino UNO,
- ein passendes USB-Datenkabel,
- eine 16x16 LED Matrix,
- fünf Breadboardkabel, männlich - weiblich, 20 cm
Anschluss der 16x16 LED Matrix an den Arduino UNO
Hier die Grafik, wie du die LED Matrix an den Arduino anschließen kannst.
16x16 LED Matrix Generator
Der kleine Generator ist sehr einfach gehalten, du hast die vier LED Matrix Module mit den entsprechenden LEDs, welche du mit der Maus anklicken kannst, die Farbe ändert sich dann von Rot auf Grau.
Du kannst einstellen, ob du nur die Arrays erzeugen lassen möchtest, oder das komplette Programm.
Mit der Schaltfläche "CODE GENERIEREN" wird, wie es sich erahnen lässt, der Code erzeugt, die Schaltfläche "LÖSCHEN" setzt alle LEDs auf den default / deaktiviert.
Programm für ein Daumenkino
Da nicht jede kleine Animation gleich viel Bilder hat, habe ich das Programm sehr dynamisch aufgebaut.
#include
const int DIN = 11;
const int CS = 7;
const int CLK = 13;
const int NUM_MATRIX_MODULE = 4;
LedControl matrix = LedControl(DIN, CLK, CS, NUM_MATRIX_MODULE);
const int BRIGHTNESS = 6;
const int NUM_IMAGES = 3;
const int MAX_ROWS = 8;
byte data = {
{
//Arrays mit den Bildern
};
void setupMatrixModul(int modulIndex) {
matrix.shutdown(modulIndex, false);
matrix.setIntensity(modulIndex, BRIGHTNESS);
matrix.clearDisplay(modulIndex);
}
void setup() {
for (int i = 0; i < NUM_MATRIX_MODULE; i++) {
matrix.shutdown(i, false);
matrix.setIntensity(i, BRIGHTNESS);
matrix.clearDisplay(i);
}
}
void drawMatrix(int modul, byte data) {
for (int row = 0; row < MAX_ROWS; row++) {
matrix.setRow(modul, row, data);
}
}
void loop() {
for (int image = 0; image < NUM_IMAGES; image++) {
for (int i = 0; i < NUM_MATRIX_MODULE; i++) {
drawMatrix(i, data);
}
delay(250);
}
for (int image = NUM_IMAGES-1; image >= 0; image--) {
for (int i = 0; i < NUM_MATRIX_MODULE; i++) {
drawMatrix(i, data);
}
delay(250);
}
}
Erzeugen eines pulsierenden Herzens mit dem Generator
Wie erwähnt, kann man mit dem Generator kleine Bilder erzeugen bzw. Arrays für das Programm.
Hier meine Lösung zu den Herzen.
Die Arrays für die Bilder sind folgendermaßen:
// Bild - 1
byte matrixModul1 = {B11111110,B11111100,B11111000,B11110000,B11100000,B11000000,B10000000,B00000000};
byte matrixModul2 = {B01111111,B00111111,B00011111,B00001111,B00000111,B00000011,B00000001,B00000000};
byte matrixModul3 = {B00111000,B01111100,B11111110,B11111111,B11111111,B11111111,B11111111,B11111111};
byte matrixModul4 = {B00011100,B00111110,B01111111,B11111111,B11111111,B11111111,B11111111,B11111111};
// Bild - 2
byte matrixModul1 = {B11111100,B11111000,B11110000,B11100000,B11000000,B10000000,B00000000,B00000000};
byte matrixModul2 = {B00111111,B00011111,B00001111,B00000111,B00000011,B00000001,B00000000,B00000000};
byte matrixModul3 = {B00000000,B00011100,B00111110,B11111110,B11111110,B11111110,B11111110,B11111110};
byte matrixModul4 = {B00000000,B00111000,B01111100,B01111111,B01111111,B01111111,B01111111,B01111111};
// Bild - 3
byte matrixModul1 = {B11110000,B11100000,B11000000,B10000000,B00000000,B00000000,B00000000,B00000000};
byte matrixModul2 = {B00001111,B00000111,B00000011,B00000001,B00000000,B00000000,B00000000,B00000000};
byte matrixModul3 = {B00000000,B00000000,B00011100,B00111110,B11111110,B11111110,B11111100,B11111000};
byte matrixModul4 = {B00000000,B00000000,B00111000,B01111100,B01111111,B01111111,B00111111,B00011111};
// Bild - 4
byte matrixModul1 = {B11111000,B11110000,B11100000,B11000000,B10000000,B00000000,B00000000,B00000000};
byte matrixModul2 = {B00011111,B00001111,B00000111,B00000011,B00000001,B00000000,B00000000,B00000000};
byte matrixModul3 = {B00000000,B00000000,B00000000,B00000000,B00111000,B01111100,B11111100,B11111100};
byte matrixModul4 = {B00000000,B00000000,B00000000,B00000000,B00011100,B00111110,B00111111,B00111111};
// Bild - 5
byte matrixModul1 = {B11111100,B11111000,B11110000,B11100000,B11000000,B10000000,B00000000,B00000000};
byte matrixModul2 = {B00111111,B00011111,B00001111,B00000111,B00000011,B00000001,B00000000,B00000000};
byte matrixModul3 = {B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B01111100,B11111100};
byte matrixModul4 = {B00000000,B00000000,B00000000,B00000000,B00000000,B00011100,B00111110,B00111111};
Download
Damit du den Code nicht abtippen / kopieren musst, hier der Code zum einfachen Download.
16x16 LED Matrix - pulsierendes HerzHerunterladen
Erzeugen eines Hampelmanns mit dem Generator
Als weitere Animation kann man einen kleinen Hampelmann erzeugen.
Hierzu erzeuge ich eine kleine Animation mit 3 Bildern.
Der Code für die Bilder ist wie folgt:
byte matrixModul1 = {B11000000,B11000000,B11000000,B11000000,B11000000,B11000000,B11000000,B11100000};
byte matrixModul2 = {B00000011,B00000011,B00000011,B00000011,B00000011,B00000011,B00000011,B00000111};
byte matrixModul3 = {B00000000,B11000000,B11000000,B10000000,B10000000,B10000000,B10000000,B10000000};
byte matrixModul4 = {B00000000,B00000011,B00000011,B00000001,B00000001,B00000001,B00000001,B00000001};
//Bild - 2
byte matrixModul1 = {B10100000,B10010000,B10001000,B10000100,B10000000,B11000000,B01100000,B00110000};
byte matrixModul2 = {B00000101,B00001001,B00010001,B00100001,B00000001,B00000011,B00000110,B00001100};
byte matrixModul3 = {B00000000,B11000000,B11000000,B10000000,B10000000,B10000000,B10000000,B11000000};
byte matrixModul4 = {B00000000,B00000011,B00000011,B00000001,B00000001,B00000001,B00000001,B00000011};
//Bild - 3
byte matrixModul1 = {B10000000,B10000000,B10000000,B10000000,B10000000,B11000000,B00110000,B00011000};
byte matrixModul2 = {B00000001,B00000001,B00000001,B00000001,B00000001,B00000111,B00011000,B00110000};
byte matrixModul3 = {B00000000,B11000000,B11001000,B10001000,B10001000,B10010000,B10100000,B11000000};
byte matrixModul4 = {B00000000,B00000011,B00010011,B00010001,B00010001,B00001001,B00000101,B00000011};
Download
Damit du den Code nicht abtippen / kopieren musst, hier der Code zum einfachen Download.
16x16 LED Matrix - HampelmannHerunterladen
Read the full article
0 notes
Stop Motion Animation-History
The magic lantern was made in 1603, it is an image projector using pictures on the sheets of glass, some sheets contain moving parts. It is considered the first example of project animation.
In 1824, the Thaumatrope housed a rotating mechanism with different picture on each side. When rotated, you saw a combined picture. The Thaumatrope is a Victorian toy constructed from a simple disk or card featuring a different picture on each side and attached to two pieces of string. When the strings are twirled rapidly the card rotates on its axis and the two images appear to combine. Invented by John Ayrton Paris (1785-1856), an English physician, in 1825, the Thaumatrope was the first instrument to exploit the persistence of images on the retina. Paris’s Philosophy in sport made science in earnest, first published in 1827, expounded his belief that scientific learning in children could be stimulated through a combination of amusement and instruction, using demonstrational toys such as the Thaumatrope.
In 1831, the phenakitoscope feature spinning disks reflected in mirrors that made it seem like the pictures were moving.
The optical toy, the phenakistoscope, was an early animation device that used the persistence of vision principle to create an illusion of motion. It was invented by Joseph Plateau in 1841.The phenakistoscope used a spinning disc attached vertically to a handle. Arrayed around the disc's center were a series of drawings showing phases of the animation, and cut through it were a series of equally spaced radial slits. The user would spin the disc and look through the moving slits at the disc's reflection in a mirror. The scanning of the slits across the reflected images kept them from simply blurring together, so that the user would see a rapid succession of images that appeared to be a single moving picture. A variant of it had two discs, one with slits and one with pictures; this was slightly more unwieldy but needed no mirror. Unlike the zoetrope and its successors, the phenakistoscope could only practically be used by one person at a time.
In 1834, the zoetrope was a hollow drum that housed images on long interchangeable strips that spin and made the images appear to move.
The zoetrope , invented in 1834 by William George Horner, was an early form of motion picture projector that consisted of a drum containing a set of still images, that was turned in a circular fashion in order to create the illusion of motion. Horner originally called it the Daedatelum, but Pierre Desvignes, a French inventor, renamed his version of it the zoetrope (from Greek word root zoo for animal life and trope for "things that turn.")
A zoetrope is relatively easy to build. It can be turned at a variable rate to create slow-motion or speeded-up effects. Like other motion simulation devices, the zoetrope depends on the fact that the human retina retains an image for about a tenth-of-a-second so that if a new image appears in that time, the sequence was seem to be uninterrupted and continuous. It also depends on what is referred to as the Phi phenomenon, which observes that we try to make sense out of any sequence of impressions, continuously relating them to each other.
In 1868 the flip-book, also known as the kineograph, reached a wise audience and it credited with inspiring early animators more than the machines developed in this era.
A flip book is a collection of combined pictures intended to be flipped over to give the illusion of movement and create an animated sequence from a simple small book without machine.
Very popular at the end of 19 th century and the beginning of 20 th century, but still produced today, flip book is the American name even used in France, more often than its French name folioscope. British people call it flick book or flicker book; in Germany Abblätterbuch (books to be flipped through) in the 19 th century and then Daumenkino : “thumb cinema”, name that we also find sometimes in the US at the beginning of 20 th century (also called thumb book) as well as less usual names such as flip movie, fingertip movie, riffle book, living picture book or hand cinema.
Some authors compared the flip book to the Magic Book or Blow Book, a fashionable kind of books in 19 th century that allowed animations or optical illusions. Actually, the only common point is that they both use the principle of animation. The actor and historian of magic, Ricky Jay, is the author of a great work devoted to these small books
In 1877, the praxinoscopre expanded on the zoetrope, using multiple wheels to rotate images. It is considered to have shown the first prototypes of the animated cartoon.
The Praxinoscope is a typical optical toy from the 19th century. It consists of a cylinder and a strip of paper showing twelve frames for animation. As the cylinder rotates, stationary mirrors in the centre reveal a ‘single image’ in motion.
The Praxinoscope was invented in 1876 by Charles-Émile Reynaud (1844-1918), a Paris science teacher, who marked all his examples ‘E.R.’. The toy became a great commercial success and won recognition at the great exhibitions of the period.
The Silent Era, 1900-1930:
The Silent era happened in the early 20th century. This was the marks of the beginning of cartoons. Many animators form studios , with bray studios in New York proving the most successful of this era. Bray helped lunch the careers of the cartoonists that created Mighty Mouse, Betty Boop and Woody Woodpecker. In 1906, was the first entirely animated film, Using stop-motion photography to create action. In 1908, the first animated film using hand drawn animation, and is considered by film historians to be the first animated cartoon. In 1919 Musical Mews and Feline Follies introduces Felix the Cat- Often considered the first animated star.
in 1928, Steamboat Willie made a cartoon which was the first cartoon with sound printed on the film, and is the first noble success for Walt Disney Studios.
The Golden Age of American Animation, 1930-1950s:
During what many consider to be the “Golden Age” of animation, theoretical cartoons became integral part of popular culture. These years are defined by the rise of Walt Disney, Warner Brothers, MGM and Fleischer.
In 1930, Warner Brother Cartoons was funded and created the Merrie Melodies series.
In 1937, Walt Disney releases Snow White and the Seven Dwarfs, the first animated feature to use hand-drawn animation.
The American Television Era, 1960-1980s:
The animation industry began to adapt to the fact that television continued its rise as the entertainment medium of choice for American families. Studios created many cartoons for TV, using a “limited animation” style. By the mid 80s, with help from cable channels such as The Disney Channel and Nickolodeon.
In 1960, Hanna Berbera releases The Flintstones, the first animated series on prime time television.
In 1961, The Yogi bear Show, a spin off of huckleberry hound debuts on national TV.
In 1963, DePatie-Freleng Enterprises wins the Academy Award for Best Short Film for The PinkPhink and continues to create shorts for theoretical release.
In 1964, Flitz the Cat is release- the fist animated adult feature film
Modern American Era, 1980-2014
The CGI (computer generated imagery) revolutionized animation. A principal difference of CGI animation compared to traditional animation is that drawing is replaced by 3D modeling, almost like a virtual version of stop-motion. A form of animation that combines the two and uses 2D computer drawing can be considered computer aided animation.
In 1984, The Adventues of Andre and Wally B was the first fully CGI animated film, created by The Graphics Group, the precursor to Pixar.
In 1987 The Simpsons was Made, The Simpsons is an American adult animated sitcom created by Matt Groening for the Fox Broadcasting Company. It is the longest-running American sitcom, the longest-running American animated program, and in 2009 it surpassed Gunsmoke as the longest-running American scripted primetime television series.
In 1995, Toy Story was the first fully computer animated feature film, was released.
In 2014, Big Hero 6 is the fist Disney animated film to feature Marvel Comic characters.
2 notes
·
View notes