Animation ASCII Star Wars

Salut a tous,

J' ai récupéré sur le site : towel.blinkenlight.nl , un petite animation ascii,

elle est diffusée via Telnet, mais avec linux ce n' est pas un problème de la transférer sur un fichier texte,

Et la ou cela deviens marrant, j' ai ressorti de mes archives électroniques un vieux terminal DEC VT420.......

Donc, un arduino uno plus shield support SD, un adaptateur TTL --> RS232 (max232)

et me voila prêt a regarder l' animation en local !

Mon code:

/*
   SD card file dump
   Animation Star_Wars  (SD)
  Modifications C.Chazottes (2014)
  
  
  This example shows how to read a file from the SD card using the
  SD library and send it over the serial port.
     
  The circuit:
  * SD card attached to SPI bus as follows:
  ** MOSI - pin 11
  ** MISO - pin 12
  ** CLK - pin 13
  ** CS - pin 10
  
  created  22 December 2010
  by Limor Fried
  modified 9 Apr 2012
  by Tom Igoe
  
  This example code is in the public domain.
      
  */

#include <SD.h>

// On the Ethernet Shield, CS is pin 4. Note that even if it's not
// used as the CS pin, the hardware CS pin (10 on most Arduino boards,
// 53 on the Mega) must be left as an output or the SD library
// functions will not work.
 const int chipSelect = 10;

void setup()
{
  // Open serial communications and wait for port to open:
   Serial.begin(19200);
      
 // Initialise le Terminal
 // Efface l'ecran, et curseur position 0,0
 
    Serial.print(F("\x1b\[H")); 
    Serial.print(F("\x1b[2J"));
   
   delay(1000);
   
   Serial.println("       Animation ASCII sur le theme: ");
   Serial.println();
   Serial.println();
   Serial.println();
   Serial.println("                          8888888888  888    88888");
   Serial.println("                         88     88   88 88   88  88");
   Serial.println("                          8888  88  88   88  88888");
   Serial.println("                             88 88 888888888 88   88");
   Serial.println("                      88888888  88 88     88 88    888888");
   Serial.println();
   Serial.println();
   Serial.println();
   Serial.println("                      88  88  88   888    88888    888888");
   Serial.println("                      88  88  88  88 88   88  88  88");
   Serial.println("                      88 8888 88 88   88  88888    8888");
   Serial.println("                       888  888 888888888 88   88     88");
   Serial.println("                        88  88  88     88 88    8888888");
   Serial.println();
   Serial.println();
   Serial.println("                                      Adaptation Arduino C.Chazottes 2014");
   Serial.println(); 
   Serial.println();
   Serial.print("  Initialisation Carte SD...       ");
   delay(3000);
   // make sure that the default chip select pin is set to
   // output, even if you don't use it:
   pinMode(10, OUTPUT);
   
   // see if the card is present and can be initialized:
   if (!SD.begin(chipSelect)) {
     Serial.println("Carte Illisible, ou Absente.");
     // don't do anything more:
     return;
   }
   Serial.println("carte initialisee.");
   delay(3000);
   
     
   // open the file. note that only one file can be open at a time,
   // so you have to close this one before opening another.
   File dataFile = SD.open("star.txt");

   // if the file is available, write to it:
   if (dataFile) {
     while (dataFile.available()) {
       Serial.write(dataFile.read());
     }
     dataFile.close();
   }  
   // if the file isn't open, pop up an error:
   else {
     Serial.println("                 Erreur ouverture fichier: star.txt");
   } 
}

void loop()
{
}

Le fichier Texte present sur la SD:

Il est dispo en bas de page, a renomer en star.txt

Et le lien utube pour visualiser le resultat:

Attention l' animation dure 30 Min !!!

Bonne visu...

star_wars_carte_sd.txt (3.17 MB)

Re...

Bon quand même un petit problème, le montage fonctionne bien jusqu'à 19200 Bauds,

mais si je passe a 38400, la c' est du grand n'importe quoi !!!! j' ai l' impression que le max 232

a du mal a suivre , mon adaptateur est monte avec des condos tantale, je vais essayer avec des petits chimiques,

Sinon je suis a l' écoute de vos idées.

a+++

christianc:
""" Comment placer ICI mon fichier ????"""

Pour ajouter un fichier:
Sous la fenêtre d'édition, cliquer sur Additional Options:
Puis Attach Choose File

Slt,

Problème: taille max du fichier dépassée !

Mon fichier TXT fait quand même: 3.16 Mo.... pas mal pour un TXT !

Ou l' Heberger ?

a+++

Dans la fenêtre de saisie il m'indique une taille limitée à 4Mo

Slt a tous,

Bon voila le fichier est en bas de page, vous avez tout pour vous amuser !

il me reste a résoudre le problème de vitesse max avec le max 232

Merci a++