Software

This program is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Pour faire interagir un Minitel et une carte Arduino, j’ai développé deux bibliothèques selon que l’on veuille passer par le port série matériel du microcontrôleur (RX/TX) ou par des broches indépendantes :

Minitel1B_Hard (ne fait pas appel à SoftwareSerial.h) :
https://github.com/eserandour/Minitel1B_Hard

Minitel1B_Soft (fait appel à SoftwareSerial.h) :
https://github.com/eserandour/Minitel1B_Soft

Liste des fonctions disponibles :

# Vitesse de la liaison série
int changeSpeed(int bauds)
int currentSpeed()
int searchSpeed()

# Séparateurs
void newScreen()
void newXY(int x, int y)

# Modes du standard Télétel
void textMode()
void graphicMode()
byte pageMode()
byte scrollMode()
byte modeMixte()
byte modeVideotex()

# Standards
byte standardTeleinformatique()
byte standardTeletel()

# Contenu
void attributs(byte attribut) => Voir les possibilités plus bas
void print(String chaine)
void println(String chaine)
void println()
void printChar(char caractere)
void printDiacriticChar(unsigned char caractere)
void printSpecialChar(byte b) => Voir les possibilités plus bas
byte getCharByte(char caractere)
String getString(unsigned long code)
int getNbBytes(unsigned long code)
void graphic(byte b)
void graphic(byte b, int x, int y)
void repeat(int n)
void bip()

# Curseur
void cursor()
void noCursor()
void moveCursorXY(int x, int y)
void moveCursorLeft(int n)
void moveCursorRight(int n)
void moveCursorDown(int n)
void moveCursorUp(int n)
void moveCursorReturn(int n)
int getCursorX()
int getCursorY()

# Effacements, Suppressions, Insertions
void cancel()
void clearScreenFromCursor()
void clearScreenToCursor()
void clearScreen()
void clearLineFromCursor()
void clearLineToCursor()
void clearLine()
void deleteChars(int n)
void insertChars(int n)
void startInsert()
void stopInsert()
void deleteLines(int n)
void insertLines(int n)

# Géométrie
void rect(int x1, int y1, int x2, int y2)
void hLine(int x1, int y, int x2, int position)
void vLine(int x, int y1, int y2, int position, int sens)

# Clavier
unsigned long getKeyCode(bool ascii = true)
byte smallMode()
byte capitalMode()
byte extendedKeyboard()
byte standardKeyboard()
byte echo(boolean commande)

# Protocole
byte aiguillage(boolean commande, byte emetteur, byte recepteur)
byte statusAiguillage(byte module)
byte connexion(boolean commande)
byte reset()

// Ecrire un octet, un mot ou un code de 4 octets maximum / Lire un octet
void writeByte(byte b)
void writeWord(word w)
void writeCode(unsigned long code)
byte readByte()

# Identification du Minitel
unsigned long identifyDevice()

Possibilités pour attributs(byte attribut) :

# Couleur de caractère
CARACTERE_NOIR / CARACTERE_ROUGE / CARACTERE_VERT / CARACTERE_JAUNE
CARACTERE_BLEU / CARACTERE_MAGENTA / CARACTERE_CYAN / CARACTERE_BLANC

# Couleur de fond
FOND_NOIR / FOND_ROUGE / FOND_VERT / FOND_JAUNE
FOND_BLEU / FOND_MAGENTA / FOND_CYAN / FOND_BLANC

# Taille
GRANDEUR_NORMALE / DOUBLE_HAUTEUR / DOUBLE_LARGEUR / DOUBLE_GRANDEUR

# Clignotement ou fixité
CLIGNOTEMENT / FIXE

# Début et fin de masquage
MASQUAGE / DEMASQUAGE

# Début ou fin de lignage
DEBUT_LIGNAGE / FIN_LIGNAGE

# Fond inversé ou normal
FOND_NORMAL / INVERSION_FOND

Possibilités pour printSpecialChar(byte b) :

LIVRE / DOLLAR / DIESE / PARAGRAPHE
FLECHE_GAUCHE / FLECHE_HAUT / FLECHE_DROITE / FLECHE_BAS
DEGRE / PLUS_OU_MOINS / DIVISION
UN_QUART / UN_DEMI / TROIS_QUART
OE_MAJUSCULE / OE_MINUSCULE
BETA