Ceci est une ancienne révision du document !


Coding Minitel

Code Arduino du chat codé en live au Parc de Montreau en juin 2019

#include <SoftwareSerial.h>
#include <Minitel.h>
 
Minitel m1;
 
int delay_var = 0;//10000;
 
void setup() {
  m1.textMode();
  m1.clearScreen();
  m1.noCursor();
 
}
 
int a, b;
void loop() {
  /*
 
    m1.text("Pop [lab] en plein air !", 10, 2);
    m1.text("..in minitel we trust !!!!", 8, 4);
    m1.text("Connexion en cours ....", 10, 6);
 
    screenChange();
 
    m1.text("Error", 10, 6);
    m1.text("Try again ?", 10, 8);
 
    screenChange();
  */
  /*
      m1.text("Bonjour Lucie", 10, 2);
      m1.text("Comment tu vas ?", 10, 4);
      m1.text("Tu as quel âge ?", 10, 6);
  */
 
  screenChange();
  delay(50);
  /*
    a++;
    a = a % 24;
 
    if(a==0) b++;
    b=b%40;
  */
  a = 4 * cos(millis() / 100.)+10;
  b = 4 * sin(millis() / 100.)+6;
 
  drawCat(a, b);
}
 
void screenChange() {
  delay(delay_var);
  m1.clearScreen();
}
 
void drawCat(int x, int y) {
 
  m1.text("_", x + 3, y + 1);
  m1.text("( \\", x + 2, y + 2);
  m1.text(") )", x + 3, y + 3);
  m1.text("( (   .-''''-.  A.-.A", x + 2, y + 4);
  m1.text("\\ \\/         \\/ , , \\", x + 3 , y + 5);
  m1.text("\\    \\      =;  t  /=", x + 4 , y + 6);
  m1.text("\\    \\''''-  ',--'", x + 5, y + 7);
  m1.text("/ // \\ \\\\", x + 7, y + 8);
  m1.text("/_,))  \\_,))", x + 6, y + 9);
}