Crazy Makers

Faites-le vous même!

SOUTENEZ-NOUS!
Déjà 8 personnes nous ont soutenu.
Nous vous sommes très reconnaissants!
PARTAGER SUR:
  • facebook
  • twitter
  • linkin
  • Google Plus
Logo CrazyMakers

EN COURS - FABRICATION PIXEL ART.



La culture maker (de l'anglais make, lit. faiseur) est une culture (ou sous-culture) contemporaine constituant une branche de la culture Do it yourself (DIY) (qu'on peut traduire en français par « faites-le vous-même »).          (Source: Wikipedia)
les "Crazy Makers" sont les plus fous et les plus passionnés des makers...

Catégorie

Arduino

Niveau de difficulté

temps nécessaire

2 heures.

Sketch à uploader dans l'arduino.

/* Arduino 256 RGB LEDs Matrix Animation Frame
* Using WS2812 LED Strips
FastLED routine Created by Yvan / https://Brainy-Bits.com
Fully Optimised by Crazydoub

const long Mario[][256] PROGMEM ={
{0x252323, 0x252323, 0x252323, 0x000000, 0xff0000, 0xff0000, 0xff0000, 0xff0000,
0xff0000, 0xff0000, 0xff0000, 0xff0000, 0x000000, 0x252323, 0x252323, 0x252323,
0x252323, 0x252323, 0x252323, 0x000000, 0x5f2e11, 0x5f2e11, 0x5f2e11, 0xe0a680,
0xe0a680, 0xe0a680, 0x5f2e11, 0xe0a680, 0x5f2e11, 0x000000, 0x252323, 0x252323,
0x252323, 0x252323, 0x000000, 0x5f2e11, 0xe0a680, 0x5f2e11, 0xe0a680, 0xe0a680,
0xe0a680, 0xe0a680, 0xe0a680, 0x5f2e11, 0x5f2e11, 0x000000, 0x252323, 0x252323,
0x252323, 0x252323, 0x252323, 0x252323, 0x000000, 0xe0a680, 0xe0a680, 0xe0a680,
0xff0000, 0x4200ff, 0xff0000, 0xff0000, 0x000000, 0x252323, 0x252323, 0x252323,
0xff0000, 0xff0000, 0xff0000, 0xff0000, 0x000000, 0x000000, 0x000000, 0x252323,
0x000000, 0xff0000, 0xff0000, 0xff0000, 0xff0000, 0xff0000, 0xff0000, 0xff0000,
0xe0a680, 0x000000, 0xe0a680, 0xe0a680, 0x000000, 0x000000, 0x000000, 0x252323,
0x252323, 0x252323, 0x000000, 0xe0a680, 0xe0a680, 0xe0a680, 0x000000, 0xe0a680,
0xe0a680, 0xe0a680, 0x000000, 0xe0a680, 0xe0a680, 0xe0a680, 0x000000, 0x252323,
0x252323, 0x252323, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0xe0a680,
0xe0a680, 0xe0a680, 0xe0a680, 0xe0a680, 0xe0a680, 0x000000, 0x252323, 0x252323,
0x252323, 0x252323, 0x252323, 0x000000, 0x000000, 0x4200ff, 0xff0000, 0xff0000,
0x252323, 0x252323, 0x000000, 0xff0000, 0xff0000, 0xff0000, 0x4200ff, 0xff0000,
0x4200ff, 0x4200ff, 0xff0000, 0xff0000, 0xff0000, 0xff0000, 0x000000, 0x252323,
0x252323, 0x000000, 0xe0a680, 0xe0a680, 0xff0000, 0x4200ff, 0xffc600, 0x4200ff,
0x4200ff, 0x4200ff, 0x4200ff, 0xe0a680, 0xe0a680, 0xe0a680, 0x000000, 0x252323,
0x252323, 0x000000, 0xe0a680, 0xe0a680, 0x4200ff, 0x4200ff, 0x4200ff, 0x000000,
0x000000, 0x4200ff, 0x4200ff, 0x4200ff, 0x000000, 0x000000, 0x252323, 0x252323,
0x252323, 0x252323, 0x000000, 0x5f2e11, 0x5f2e11, 0x5f2e11, 0x5f2e11, 0x000000,
0x000000, 0x5f2e11, 0x5f2e11, 0x5f2e11, 0x5f2e11, 0x5f2e11, 0x000000, 0x252323,
0xff0000, 0x4200ff, 0xff0000, 0xff0000, 0xff0000, 0x000000, 0x252323, 0x252323,
0x252323, 0x000000, 0xff0000, 0xff0000, 0xff0000, 0xff0000, 0x4200ff, 0x4200ff,
0x4200ff, 0xffc600, 0x4200ff, 0xff0000, 0xe0a680, 0xe0a680, 0x000000, 0x252323,
0x252323, 0x000000, 0xe0a680, 0xe0a680, 0xe0a680, 0x4200ff, 0x4200ff, 0x4200ff,
0x000000, 0x4200ff, 0x4200ff, 0x4200ff, 0xe0a680, 0xe0a680, 0x000000, 0x252323,
0x252323, 0x252323, 0x000000, 0x000000, 0x4200ff, 0x4200ff, 0x4200ff, 0x000000,
0x000000, 0x5f2e11, 0x5f2e11, 0x5f2e11, 0x5f2e11, 0x000000, 0x252323, 0x252323,
0x252323, 0x000000, 0x5f2e11, 0x5f2e11, 0x5f2e11, 0x5f2e11, 0x5f2e11, 0x000000},
{
0x252323, 0x252323, 0x252323, 0x252323, 0x252323, 0x000000, 0xff0000, 0xff0000,
0xff0000, 0xff0000, 0xff0000, 0x000000, 0x252323, 0x252323, 0x252323, 0x252323,
0x252323, 0x252323, 0x252323, 0x252323, 0x000000, 0x5f2e11, 0x5f2e11, 0x5f2e11,
0xe0a680, 0x5f2e11, 0xe0a680, 0x5f2e11, 0x000000, 0x252323, 0x252323, 0x252323,
0x252323, 0x252323, 0x252323, 0x000000, 0x5f2e11, 0xe0a680, 0x5f2e11, 0x5f2e11,
0xe0a680, 0xe0a680, 0x5f2e11, 0x5f2e11, 0x000000, 0x252323, 0x252323, 0x252323,
0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0xe0a680, 0xe0a680,
0x4200ff, 0xff0000, 0xff0000, 0xff0000, 0xff0000, 0xe0a680, 0xe0a680, 0xe0a680,
0xff0000, 0xff0000, 0xff0000, 0x000000, 0x000000, 0xe0a680, 0xe0a680, 0xe0a680,
0xe0a680, 0xe0a680, 0xff0000, 0xff0000, 0xff0000, 0xff0000, 0xff0000, 0xff0000,
0xe0a680, 0xe0a680, 0x000000, 0xe0a680, 0x252323, 0xff0000, 0xff0000, 0xff0000,
0xff0000, 0xff0000, 0xe0a680, 0xe0a680, 0xe0a680, 0x000000, 0xe0a680, 0xe0a680,
0xe0a680, 0xe0a680, 0xe0a680, 0x000000, 0xe0a680, 0xe0a680, 0xe0a680, 0xff0000,
0x000000, 0xff0000, 0x000000, 0x000000, 0x000000, 0x000000, 0xe0a680, 0xe0a680,
0xe0a680, 0xe0a680, 0xe0a680, 0xe0a680, 0xe0a680, 0xff0000, 0xff0000, 0x000000,
0x000000, 0x000000, 0xff0000, 0xff0000, 0x4200ff, 0xff0000, 0xff0000, 0xff0000,
0xe0a680, 0xe0a680, 0xe0a680, 0xff0000, 0xff0000, 0xff0000, 0xff0000, 0xff0000,
0x4200ff, 0xff0000, 0xff0000, 0xff0000, 0x000000, 0x000000, 0x000000, 0x000000,
0x252323, 0x252323, 0x252323, 0x000000, 0x000000, 0x4200ff, 0x4200ff, 0x4200ff,
0x4200ff, 0x4200ff, 0x4200ff, 0x5f2e11, 0x5f2e11, 0x000000, 0x252323, 0x252323,
0x252323, 0x000000, 0x5f2e11, 0x5f2e11, 0x5f2e11, 0x4200ff, 0x4200ff, 0x4200ff,
0x000000, 0x000000, 0x000000, 0x000000, 0x5f2e11, 0x5f2e11, 0x000000, 0x252323,
0x252323, 0x252323, 0x000000, 0x000000, 0x252323, 0x252323, 0x252323, 0x252323,
0x252323, 0x252323, 0x252323, 0x252323, 0x252323, 0x252323, 0x252323, 0x252323,
0x4200ff, 0xff0000, 0xff0000, 0xff0000, 0x4200ff, 0x000000, 0x000000, 0x5f2e11,
0x5f2e11, 0x4200ff, 0x4200ff, 0xffc600, 0x4200ff, 0x4200ff, 0x4200ff, 0x4200ff,
0x4200ff, 0xffc600, 0x4200ff, 0x4200ff, 0x4200ff, 0x4200ff, 0x4200ff, 0x5f2e11,
0x5f2e11, 0x4200ff, 0x4200ff, 0x4200ff, 0x4200ff, 0x4200ff, 0x4200ff, 0x4200ff,
0x4200ff, 0x4200ff, 0x4200ff, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000,
0x252323, 0x252323, 0x252323, 0x252323, 0x252323, 0x000000, 0x000000, 0x000000,
0x252323, 0x252323, 0x252323, 0x252323, 0x252323, 0x252323, 0x252323, 0x252323,
0x252323, 0x252323, 0x252323, 0x252323, 0x252323, 0x252323, 0x252323, 0x252323}};

 

#include <avr/pgmspace.h>
#include "FastLED.h"

#define NOMBRE_DE_LEDS 256
#define PIN_DE_L_ARDUINO 2
#define LUMINOSITE 20 // Connected to the data pin of the first LED strip

// Define the array of leds
CRGB leds[NOMBRE_DE_LEDS];

 

void setup() {
FastLED.addLeds<NEOPIXEL,PIN_DE_L_ARDUINO>(leds, NOMBRE_DE_LEDS); // Init of the Fastled library
FastLED.setBrightness(0);
Serial.begin(9600);
}

void fadeout(){
for(int i=LUMINOSITE; i>0; i--) { // Display it 8 times
FastLED.setBrightness(i);
FastLED.show();
delay(5);}
FastLED.clear();
}

void fadein(){
for(int i=0; i<=LUMINOSITE; i++) { // Display it 8 times
FastLED.setBrightness(i);
FastLED.show();
delay(5);}
}

void afficher(const long ANIMATION[][256], int NOMBRE_DE_SPRITES, int DELAI_ENTRE_SPRITES, int NB_REPETITIONS){
int k=0;
for(int i = 0; i < NOMBRE_DE_LEDS; i++) {leds[i] = pgm_read_dword(&(ANIMATION[0][i])); }
FastLED.show();
fadein();
while( k<NB_REPETITIONS){
for(int j = 0; j < NOMBRE_DE_SPRITES; j++) { //Compteur de sprites
FastLED.clear();
for(int i = 0; i < NOMBRE_DE_LEDS; i++) {
leds[i] = pgm_read_dword(&(ANIMATION[j][i])); //Remplissage avec la sprite en cours
}
FastLED.show(); //Affichage de la sprite
delay(DELAI_ENTRE_SPRITES);
}
k++;
}
fadeout();
}

void loop() {
//afficher (Array, Nombre de sprites, délai images, répétitions);
afficher(Mario,2,500,4);
}

Script perso à utiliser dans "LCD Images Converter":

for (var y = 0; y < image.height/2;y++) {
for (var x = 0; x < image.width/2; x++) {
image.addPoint(x, y);
}
y++
for (var x = image.width/2-1; x >=0; x--) {
image.addPoint(x, y);
}
}

for (var y = 0; y < image.height/2;y++) {
for (var x = image.width/2; x < image.width; x++) {
image.addPoint(x, y);
}
y++
for (var x = image.width-1; x >= image.width/2; x--) {
image.addPoint(x, y);
}
}

for (var y = image.height/2; y < image.height;y++) {
for (var x = 0; x < image.width/2; x++) {
image.addPoint(x, y);
}
y++
for (var x = image.width/2-1; x >=0; x--) {
image.addPoint(x, y);
}
}

for (var y = image.height/2; y < image.height;y++) {
for (var x = image.width/2; x < image.width; x++) {
image.addPoint(x, y);
}
y++
for (var x = image.width-1; x >= image.width/2; x--) {
image.addPoint(x, y);
}
}