terça-feira, 27 de dezembro de 2016

ABMS Propeller Message Display - LED POV


Este projeto visa exemplificar o uso da persistência da visão POV (Persistence Of Vision) para gerar uma mensagem rotativa no ar usando apenas 10 LEDs. Também chamado de "POV stick".


Para quem quiser saber mais sobre persistência da visão, leia algumas citações:
A persistência da imagem, também conhecida como persistência da retina, ou ainda retenção retinal, é uma propriedade do olho humano de “reter” na retina a imagem captada durante um pequeno intervalo de tempo. Essa propriedade é percebida quando o olho é exposto a uma fonte luminosa e em seguida é exposto à total escuridão, pois a luz que penetra a retina é gravada e leva algum tempo para se desfazer (OLIVEIRA, 2009).
Essa persistência da imagem na retina permite a fusão de imagens intermitentes (GUYTON & HALL, 2006).
A percepção das imagens não é instantânea. É necessário um período de latência – relativo à cada cor – para que a imagem seja captada. Porém esse período é aproximadamente compensado pela retenção retinal (PEDROSA, 2009)
O tempo de persistência da imagem na retina é de aproximadamente 1/10 segundo (GAIOSKI, LEHMKUHL, & COSTA, 2007).
Assim, se as excitações sobre a retina forem feitas com intervalos menores cada impressão ainda encontra a anterior, à qual se pode ligar, dando-nos uma ideia de continuidade.



O aparato consiste em piscar e rotacionar 8 LEDs numa frequência tal que o olho humano não perceba uma descontinuidade na formação da mensagem.
Todos os caracteres que formam a mensagem serão varridos (coluna a coluna) e a velocidade de rotação angular do dispositivo, aliada a velocidade das piscadas dos LEDs irão gerar a imagem no ar como se ela estivesse para e completa.

CONCEITO:
O sistema necessita de: fonte de alimentação ajustável, motor, uControlador, sistema de posicionamento e rotação, bateria e LEDs
A figura abaixo mostra o diagrama em blocos dos sistema.



Através da tensão variável no motor, podemos controlar a velocidade de rotação (atrasando ou adiantando o ponto zero do sistema (inicio/fim de uma volta completa) que determina quando o sistema deve iniciar um novo loop da mensagem...
O reed switch é o componente que detecta esse ponto (toda vez que ele passar pelo imã (fixo) uma volta foi completada e o sistema deve iniciar novamente a mensagem; isso sincroniza o sistema mecanicamente falando, o SW faz o resto.


COMPONENTES:

Arduino Nano  (uControlador usado no sistema)
A escolha desse uControlador deve se a ele ser pequeno, leve e poder ser alimentado a partir de 3,3V




LEDs:
Light Emitting Diode - Diodo Emissor de Luz


Existe uma variedade deles (formatos, tamanhos, cores, etc) - escolha um de alto brilho - usei 2 vermelhos e 8 azuis.

Sensor de posicionamento (Reed Switch) + Imã:
Reed Switch é uma chave (em formato de ampola) de efeito magnético, ou seja ela fecha na presença de um campo magnético.
Usado no sistema para controlar a passagem (volta completa) por um ponto zero. Toda vez que o sistema detectar esse ponto é hora de iniciar novamente o processo e disparar novamente a geração da mensagem. Com isso podemos controlar a velocidade de rotação angular (associado a uma tensão variável no motor).




Imãs de Neodymiun
Pequenos, baratos mas fortes...


Motor DC
O motor que fornecerá rotação ao sistema.
A velocidade e rotação serão controlados por variação de tensão aplicada ao motor e no sistema o reed switch detectará quando uma volta foi completada inciando novamente o processo de geração da mensagem.



Bateria:
Para alimentar o sistema (uControlador) devemos usar uma bateria com boa carga e 3,7V e que seja leve.
Melhor opção bateria Lipo.
3,7V / 850mA
Resistores:
Para controlar a corrente nos LEDs e fazer o Pull-up do sensor reedSW.
10 x 220R
1 x 10K


PCB:
Placa perfurada em ilhas.
Com pelo menos 21cm....


Outros:
Chave H-H, conectores, fios, suporte, solda, cola, etc....

ESQUEMA:

O Arduino NANO é alimentado por uma bateria Litium Polimero (Lipo) de 3,7V / 850 mA
Nesse caso é o suficiente para o uControlador e os LEDs com boa autonomia (sendo que pode ser recarregada).

O Motor, dependendo do tipo que você usar pode requerer uma tensão maior (preferencialmente ajustável) e corrente maior que 300mA....
Fica a sua escolha!





CÓDIGOS:
Abaixo o código principal e a biblioteca usada
Coloque o nome que desejar no arquivo principal, porém a bilbioteca deve chamar-se "font.h"
Para isso abra uma nova guia na IDE do arduino e nomeie como font.h e então cole o conteúdo do arquivo fonte.h  nessa aba....

Para mais comodidade, você pode fazer o download dos arquivos no GitHub abaixo:
https://github.com/Arduinobymyself/Propeller_Message_Display

1 - Código Principal:
  /*
#####################################################################################
#   File:               ABMS_Propeller_Clock_v3.ino
#   Processor:          Arduino UNO, MEGA ou Teensy++ 2.0      
#   Language:           Wiring / C /Processing /Fritzing / Arduino IDE          
#           
#   Objectives:         To demonstrating the Persistence Of Vision (POV) effect by creating
#                       a LED gadget showing rotative messages  
#                     
#   Behavior:           By sinchronized rotating the LEDs will show a message
#                       using POV
#                           
#
#     
#   Author:                 Marcelo Moraes 
#   Date:                   27/12/16  
#   place:                  Brazil, Sorocaba City 
#         
#####################################################################################

  This project contains public domain code.
  The modification is allowed without notice.
  
 */
  
  // defining the alphabet characters
  #include "font.h"
  
  
  // define the Arduino LED pins for the letters
  const int LEDpins[] = {3,4,5,6,7,8,9,10};
  
  int rows = 8;        // Total LED's in a row
  const int charHeight = 8;
  const int charWidth = 5;
  
  const int _delay = 200;
  
  // sensor setup
  const int sensorPIN = 12;  // define the Arduino sensor pin
  int sensVal;  // variable to store the value coming from the sensor
  
  int i;

  String tmp_str;
  
  //put your message here
  char textString[] = "Arduino By MySelf";
  
  
  void setup(){
    //reed switch sensor pin connected at pin 12 is an input
    pinMode(sensorPIN,INPUT);
    // all other pins are outputs (2,3,4,5,6,7,8,9,10,11)
    // the stick has 10 LEDs (8 for letters and 2 by general purpose)
    for (i = 0; i <=11; i++){
      pinMode(LEDpins[i],OUTPUT);    
    }
  }
  
void loop(){
  // just inititiat this var with a blank string
  tmp_str=tmp_str+" ";
  
  while(digitalRead(sensorPIN) == 0){
    digitalWrite(13, LOW);   // set the LED off
  }
  digitalWrite(13, HIGH);   // set the LED on
  delayMicroseconds(_delay);

  //writes the message
  for (int k=sizeof(textString)-1; k>-1; k--){
    printLetterboven(textString[k]);
    }
}
  

//normal and forwards printted letters  
void printLetterboven(char ch){
  // make sure the character is within the alphabet bounds (defined by the font.h file)
  // if it's not, make it a blank character
  if (ch < 32 || ch > 126){
    ch = 32;
  }
  // subtract the space character (converts the ASCII number to the font index number)
  ch -= 32;
  // step through each byte of the character array
  for (int i=charWidth-1; i>-1; i--) {
    byte b = font[ch][i];
    for (int j=0; j<charHeight; j++) {
      digitalWrite(LEDpins[j], bitRead(b,j));
      digitalWrite(2,HIGH);
      digitalWrite(11,HIGH);
    }
    delayMicroseconds(_delay);
    
  }
  //clear the LEDs
  for (i = 0; i < rows; i++){
    digitalWrite(LEDpins[i] , LOW);
    digitalWrite(2,LOW);
    digitalWrite(11,LOW);
  }
  // space between letters
  delayMicroseconds(_delay);
}  

//inverted (flipped) and backwards printed letters
void printLetter(char ch){
  // make sure the character is within the alphabet bounds (defined by the font.h file)
  // if it's not, make it a blank character
  if (ch < 32 || ch > 126){
    ch = 32;
  }
  // subtract the space character (converts the ASCII number to the font index number)
  ch -= 32;
  // step through each byte of the character array
  for (int i=0; i<charWidth; i++) {
    byte b = font[ch][i];
    for (int j=0; j<charHeight; j++) {
       digitalWrite(LEDpins[j], bitRead(b, 7-j));
       digitalWrite(2,HIGH);
       digitalWrite(11,HIGH);
     }
     delayMicroseconds(_delay);
   }
   //clear the LEDs
   for (i = 0; i < rows; i++){
    digitalWrite(LEDpins[i] , LOW);
    digitalWrite(2,LOW);
    digitalWrite(11,LOW);
   }
   // space between letters
   delayMicroseconds(_delay);
}

2 - Biblioteca fonte.h:
*** esta biblioteca é de um outro autor, mas consiste dos caracteres da tabela ASCII em Hexadecimal para fonte tipo 5 x 7 padrão, ou seja: nada muito complicado.... ***
///===========================================================
 // font.h
 //
 // by Scott Mitchell
 // www.openobject.org
 // Open Source Urbanism
 //
 // Copyright (C) 2008 Scott Mitchell 12-10-2008
 //
 // 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.
 //
 // This program is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
 //
 // A copy of the GNU General Public License
 // can be found at <http://www.gnu.org/licenses/>.
 //
 // B4.1
 // Last Modified: October 13, 2008
 //============================================================

 // defining the alphabet
 // ascii 7x5 side-feeding characters for led modules
 // addapted from http://www.sxlist.com/TECHREF/datafile/charset/8x6.htm

 //const byte font[][5] = {
   const unsigned char font[95][5] = {
         {0x00,0x00,0x00,0x00,0x00},   //   0x20 32
         {0x00,0x00,0x6f,0x00,0x00},   // ! 0x21 33
         {0x00,0x07,0x00,0x07,0x00},   // " 0x22 34
         {0x14,0x7f,0x14,0x7f,0x14},   // # 0x23 35
         {0x00,0x07,0x04,0x1e,0x00},   // $ 0x24 36
         {0x23,0x13,0x08,0x64,0x62},   // % 0x25 37
         {0x36,0x49,0x56,0x20,0x50},   // & 0x26 38
         {0x00,0x00,0x07,0x00,0x00},   // ' 0x27 39
         {0x00,0x1c,0x22,0x41,0x00},   // ( 0x28 40
         {0x00,0x41,0x22,0x1c,0x00},   // ) 0x29 41
         {0x14,0x08,0x3e,0x08,0x14},   // * 0x2a 42
         {0x08,0x08,0x3e,0x08,0x08},   // + 0x2b 43
         {0x00,0x50,0x30,0x00,0x00},   // , 0x2c 44
         {0x08,0x08,0x08,0x08,0x08},   // - 0x2d 45
         {0x00,0x60,0x60,0x00,0x00},   // . 0x2e 46
         {0x20,0x10,0x08,0x04,0x02},   // / 0x2f 47
         {0x3e,0x51,0x49,0x45,0x3e},   // 0 0x30 48
         {0x00,0x42,0x7f,0x40,0x00},   // 1 0x31 49
         {0x42,0x61,0x51,0x49,0x46},   // 2 0x32 50
         {0x21,0x41,0x45,0x4b,0x31},   // 3 0x33 51
         {0x18,0x14,0x12,0x7f,0x10},   // 4 0x34 52
         {0x27,0x45,0x45,0x45,0x39},   // 5 0x35 53
         {0x3c,0x4a,0x49,0x49,0x30},   // 6 0x36 54
         {0x01,0x71,0x09,0x05,0x03},   // 7 0x37 55
         {0x36,0x49,0x49,0x49,0x36},   // 8 0x38 56
         {0x06,0x49,0x49,0x29,0x1e},   // 9 0x39 57
         {0x00,0x36,0x36,0x00,0x00},   // : 0x3a 58
         {0x00,0x56,0x36,0x00,0x00},   // ; 0x3b 59
         {0x08,0x14,0x22,0x41,0x00},   // < 0x3c 60
         {0x14,0x14,0x14,0x14,0x14},   // = 0x3d 61
         {0x00,0x41,0x22,0x14,0x08},   // > 0x3e 62
         {0x02,0x01,0x51,0x09,0x06},   // ? 0x3f 63
         {0x3e,0x41,0x5d,0x49,0x4e},   // @ 0x40 64
         {0x7e,0x09,0x09,0x09,0x7e},   // A 0x41 65
         {0x7f,0x49,0x49,0x49,0x36},   // B 0x42 66
         {0x3e,0x41,0x41,0x41,0x22},   // C 0x43 67
         {0x7f,0x41,0x41,0x41,0x3e},   // D 0x44 68
         {0x7f,0x49,0x49,0x49,0x41},   // E 0x45 69
         {0x7f,0x09,0x09,0x09,0x01},   // F 0x46 70
         {0x3e,0x41,0x49,0x49,0x7a},   // G 0x47 71
         {0x7f,0x08,0x08,0x08,0x7f},   // H 0x48 72
         {0x00,0x41,0x7f,0x41,0x00},   // I 0x49 73
         {0x20,0x40,0x41,0x3f,0x01},   // J 0x4a 74
         {0x7f,0x08,0x14,0x22,0x41},   // K 0x4b 75
         {0x7f,0x40,0x40,0x40,0x40},   // L 0x4c 76
         {0x7f,0x02,0x0c,0x02,0x7f},   // M 0x4d 77
         {0x7f,0x04,0x08,0x10,0x7f},   // N 0x4e 78
         {0x3e,0x41,0x41,0x41,0x3e},   // O 0x4f 79
         {0x7f,0x09,0x09,0x09,0x06},   // P 0x50 80
         {0x3e,0x41,0x51,0x21,0x5e},   // Q 0x51 81
         {0x7f,0x09,0x19,0x29,0x46},   // R 0x52 82
         {0x46,0x49,0x49,0x49,0x31},   // S 0x53 83
         {0x01,0x01,0x7f,0x01,0x01},   // T 0x54 84
         {0x3f,0x40,0x40,0x40,0x3f},   // U 0x55 85
         {0x0f,0x30,0x40,0x30,0x0f},   // V 0x56 86
         {0x3f,0x40,0x30,0x40,0x3f},   // W 0x57 87
         {0x63,0x14,0x08,0x14,0x63},   // X 0x58 88
         {0x07,0x08,0x70,0x08,0x07},   // Y 0x59 89
         {0x61,0x51,0x49,0x45,0x43},   // Z 0x5a 90
         {0x3c,0x4a,0x49,0x29,0x1e},   // [ 0x5b 91
         {0x02,0x04,0x08,0x10,0x20},   // \ 0x5c 92
         {0x00,0x41,0x7f,0x00,0x00},   // ] 0x5d 93
         {0x04,0x02,0x01,0x02,0x04},   // ^ 0x5e 94
         {0x40,0x40,0x40,0x40,0x40},   // _ 0x5f 95
         {0x00,0x00,0x03,0x04,0x00},   // ` 0x60 96
         {0x20,0x54,0x54,0x54,0x78},   // a 0x61 97
         {0x7f,0x48,0x44,0x44,0x38},   // b 0x62 98
         {0x38,0x44,0x44,0x44,0x20},   // c 0x63 99
         {0x38,0x44,0x44,0x48,0x7f},   // d 0x64 100
         {0x38,0x54,0x54,0x54,0x18},   // e 0x65 101
         {0x08,0x7e,0x09,0x01,0x02},   // f 0x66 102
         {0x0c,0x52,0x52,0x52,0x3e},   // g 0x67 103
         {0x7f,0x08,0x04,0x04,0x78},   // h 0x68 104
         {0x00,0x44,0x7d,0x40,0x00},   // i 0x69 105
         {0x20,0x40,0x44,0x3d,0x00},   // j 0x6a 106
         {0x00,0x7f,0x10,0x28,0x44},   // k 0x6b 107
         {0x00,0x41,0x7f,0x40,0x00},   // l 0x6c 108
         {0x7c,0x04,0x18,0x04,0x78},   // m 0x6d 109
         {0x7c,0x08,0x04,0x04,0x78},   // n 0x6e 110
         {0x38,0x44,0x44,0x44,0x38},   // o 0x6f 111
         {0x7c,0x14,0x14,0x14,0x08},   // p 0x70 112
         {0x08,0x14,0x14,0x18,0x7c},   // q 0x71 113
         {0x7c,0x08,0x04,0x04,0x08},   // r 0x72 114
         {0x48,0x54,0x54,0x54,0x20},   // s 0x73 115
         {0x04,0x3f,0x44,0x40,0x20},   // t 0x74 116
         {0x3c,0x40,0x40,0x20,0x7c},   // u 0x75 117
         {0x1c,0x20,0x40,0x20,0x1c},   // v 0x76 118
         {0x3c,0x40,0x30,0x40,0x3c},   // w 0x77 119
         {0x44,0x28,0x10,0x28,0x44},   // x 0x78 120
         {0x0c,0x50,0x50,0x50,0x3c},   // y 0x79 121
         {0x44,0x64,0x54,0x4c,0x44},   // z 0x7a 122
         {0x00,0x08,0x36,0x41,0x41},   // { 0x7b 123
         {0x00,0x00,0x7f,0x00,0x00},   // | 0x7c 124
         {0x41,0x41,0x36,0x08,0x00},   // } 0x7d 125
         {0x04,0x02,0x04,0x08,0x04},   // ~ 0x7e 126
     };
 /*
 Creative Commons Attribution-Noncommercial-Share Alike 2.5 Australia License
     This page was last modified 14:41, 11 January 2009. This page has been accessed 1,477 times.

     Content is available under Creative Commons Attribution-Noncommercial-Share Alike 2.5 Australia License.
     About Open Source Urbanism
     Disclaimers

    
 Powered by MediaWiki
 */


3 - Nova versão, mais aprimorada e com algumas correções:
Use o mesmo arquivo fonte.h de biblioteca.
Nessa versão está funcionando o anel interno e externo em LED vermelho.

  /*
#####################################################################################
#   File:               ABMS_Propeller_Clock_v3_1.ino
#   Processor:          Arduino UNO, MEGA ou Teensy++ 2.0      
#   Language:           Wiring / C /Processing /Fritzing / Arduino IDE          
#           
#   Objectives:         To demonstrating the Persistence Of Vision (POV) effect by creating
#                       a LED gadget showing rotative messages  
#                     
#   Behavior:           By sinchronized rotating the LEDs will show a message
#                       using POV
#                           
#
#     
#   Author:                 Marcelo Moraes 
#   Date:                   27/12/16  
#   place:                  Brazil, Sorocaba City 
#         
#####################################################################################

  This project contains public domain code.
  The modification is allowed without notice.
  
 */
  
  // defining the ASCII alphabet characters from the font.h library
  #include "font.h"
  
  
  // define the Arduino LED pins
  const int LEDpins[] = {2,3,4,5,6,7,8,9,10,11}; //only 8 pins, 
                                            //pins 2 and 11 is for the inner and outter ring
  
  int rows = 8;        // Total LEDs in a row
  const int charHeight = 8;
  const int charWidth = 5;
  
  const int _povDelay = 10; //persistence of vision need 1/10 of second
  const int _delay = 400; //delay for letters
  
  // sensor setup
  const int sensorPin = 12;  // define the Arduino sensor pin
                             // the sensor is a Reed Switch with pull down resistor 
                             // connected to the +5Vdc
                             
  int sensVal;  // variable to store the value coming from the sensor (not used)
  
  int i;
  int State = 0;
  int lastState = 0;

  
  //put your message here
  char textString[] = "Happy New Year!";
  
  
void setup(){
  //reed switch sensor pin connected at pin 12 and is an input
  pinMode(sensorPin,INPUT);
  // all other pins are outputs (2,3,4,5,6,7,8,9,10,11)
  // the stick has 10 LEDs (8 for letters and 2 for the inner and outter ring)
  for (i = 0; i <=11; i++){
    pinMode(LEDpins[i],OUTPUT);    
  }

  //digitalWrite(2,HIGH);
  //digitalWrite(11,HIGH);
  
}//end of setup

  
void loop(){
  digitalWrite(2,HIGH);
  //digitalWrite(10,HIGH);
  digitalWrite(11,HIGH);
  
  State = digitalRead(sensorPin); //get the sensor state
  if(State != lastState){//if sensor state changed
    if(State == HIGH){//if sensor state is high
      delayMicroseconds(_povDelay); //POV delay 1/10 of second
      //writes the message
      for (int k=sizeof(textString)-1; k>-1; k--){
        printNormalLetter(textString[k]);
      }
    }
    lastState = State;
  }
  //delayMicroseconds(_povDelay); //POV delay 1/10 of second
}//end of main loop
  

//normal and forwards printted letters  
void printNormalLetter(char ch){
  // make sure the character is within the alphabet bounds (defined by the font.h file)
  // if it's not, make it a blank character
  if (ch < 32 || ch > 126){
    ch = 32;
  }
  // subtract the space character (converts the ASCII number to the font index number)
  ch -= 32;
  // step through each byte of the character array
  for (int i=charWidth-1; i>-1; i--) {//width = 5 so i=4 to 0
    byte b = font[ch][i];
    for (int j=0; j<charHeight; j++) {//height = 8 so j=0 to 7
      digitalWrite(LEDpins[j+1], bitRead(b,j));
    }
    delayMicroseconds(_delay);
  }
  //clear the LEDs
  for (i = 0; i < rows; i++){
    digitalWrite(LEDpins[i+1] , LOW);
  }
  // space between letters
  delayMicroseconds(_delay);
}  

//inverted (flipped) and backwards printed letters
void printInvertedLetter(char ch){
  // make sure the character is within the alphabet bounds (defined by the font.h file)
  // if it's not, make it a blank character
  if (ch < 32 || ch > 126){
    ch = 32;
  }
  // subtract the space character (converts the ASCII number to the font index number)
  ch -= 32;
  // step through each byte of the character array
  for (int i=0; i<charWidth; i++) {
    byte b = font[ch][i];
    for (int j=0; j<charHeight; j++) {
       digitalWrite(LEDpins[j+1], bitRead(b, 7-j));
     }
     delayMicroseconds(_delay);
   }
   //clear the LEDs
   for (i = 0; i < rows; i++){
    digitalWrite(LEDpins[i+1] , LOW);
   }
   // space between letters
   delayMicroseconds(_delay);

}



4 - Essa versão é mais "braçal"..... não é tão refinada... deu muito trabalho para criar todas as letras/caracteres/símbolos em binário...... mas não precisa de biblioteca e funciona muito bem.

  /*
#####################################################################################
#   File:               ABMS_Propeller_Clock_v4.ino
#   Processor:          Arduino UNO, MEGA ou Teensy++ 2.0      
#   Language:           Wiring / C /Processing /Fritzing / Arduino IDE          
#           
#   Objectives:         To demonstrating the Persistence Of Vision (POV) effect by creating
#                       a LED gadget showing rotative messages  
#                     
#   Behavior:           By sinchronized rotating the LEDs will show a message
#                       using POV
#                           
#
#     
#   Author:                 Marcelo Moraes 
#   Date:                   27/12/16  
#   place:                  Brazil, Sorocaba City 
#         
#####################################################################################

  This project contains public domain code.
  The modification is allowed without notice.
  
 */


int timer = 400;    
int sensorPin = 12;
int State = 0;         
int lastState = 0;     




//Character's Matrix Array....
boolean space[]={0,0,0,0,0,0,0,0}; // just one column space between the letters
boolean _[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; //no letter, blank space

//ASCII 5x7 alphabet letters uppercase
boolean A[] = {0,1,1,1,1,1,1,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,1,1,1,1,1,0};
boolean B[] = {0,1,1,1,1,1,1,1,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0,1,1,1,1,1,0};
boolean C[] = {0,0,1,1,1,1,1,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,1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,1,0,0,0,1,0,1,0,1,0,0,0,0,1,1};

//ASCII 5x7 alphabet letters lowercase
boolean a[] = {0,0,1,0,0,0,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,1,1,1,0,0,0};
boolean b[] = {0,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,1,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,0,1,1,0,0,0,0};
boolean c[] = {0,0,1,1,1,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,1,0,0,0,0,0};
boolean d[] = {0,0,1,1,0,0,0,0,0,1,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,1,0,1,0,0,0,0,0,1,1,1,1,1,1,1};
boolean e[] = {0,0,1,1,1,0,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,0,0,1,1,0,0,0};
boolean f[] = {0,0,0,0,1,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0};
boolean g[] = {0,0,0,0,1,1,0,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,1,1,1,1,0};
boolean h[] = {0,1,1,1,1,1,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,1,1,1,0,0,0};
boolean i[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
boolean j[] = {0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,1,1,1,1,0,1,0,0,0,0,0,0,0,0};
boolean k[] = {0,1,1,1,1,1,1,1,0,0,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0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1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,1};
boolean _8[] = {0,0,1,1,0,1,1,0,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0,1,1,0,1,1,0};
boolean _9[] = {0,0,0,0,0,1,1,0,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,1,1,1,0};


//ASCII 5x7 alphabet symbols
boolean _exclamation[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; //!
boolean _quotation[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0}; //"
boolean _number[] = {0,0,0,1,0,1,0,0,0,1,1,1,1,1,1,1,0,0,0,1,0,1,0,0,0,1,1,1,1,1,1,1,0,0,0,1,0,1,0,0}; //#
boolean _dollar[] = {0,0,1,0,0,1,0,0,0,0,1,0,1,0,1,0,0,1,1,1,1,1,1,1,0,0,1,0,1,0,1,0,0,0,0,1,0,0,1,0}; //$
boolean _percent[] = {0,0,1,0,0,0,1,1,0,0,0,1,0,0,1,1,0,0,0,0,1,0,0,0,0,1,1,0,0,1,0,0,0,1,1,0,0,0,1,0}; //%
boolean _ampersand[] = {0,0,1,1,0,1,1,0,0,1,0,0,1,0,0,1,0,1,0,1,0,1,0,1,0,0,1,0,0,0,1,0,0,1,0,1,0,0,0,0}; //&
boolean _apostrophe[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; //'
boolean _openparentheses[] = {0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,0,0,0,1,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0}; //(
boolean _closeparentheses[] = {0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,1,0,0,0,1,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0}; //)
boolean _asterisk[] = {0,0,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,1,0,1,0,0}; //*
boolean _plus[] = {0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0}; //+
boolean _comma[] = {0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; //,
boolean _hyphen[] = {0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0}; //-
boolean _period[] = {0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; //.
boolean _slash[] = {0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0}; ///
boolean _colon[] = {0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; //:
boolean _semicolon[] = {0,0,0,0,0,0,0,0,0,1,0,1,0,1,1,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; //;
boolean _lessthan[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0,1,0,0,1,0,0,0,0,0,1}; //<
boolean _equal[] = {0,0,0,1,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,1,0,0}; //=
boolean _greatherthan[] = {0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,1,0,0,0,1,0,0,0,0,1,0,1,0,0,0,0,0,0,1,0,0,0}; //>
boolean _question[] = {0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,0,1,1,0}; //?
boolean _leftbrakets[] = {0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0}; //[
boolean _backslash[] = {0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0}; //\
boolean _rightbrakets[] = {0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; //]
boolean _caret[] = {0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0}; //^
boolean _underline[] = {0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0}; //_
boolean _leftgbrace[] = {0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,0,1,1,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0}; //{
boolean _stroke[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; //|
boolean _rightbrace[] = {0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,1,1,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0}; //}
boolean _tilde[] = {0,0,0,0,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,0,0}; //~ 
boolean _ellipses[] = {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0}; //... 
boolean _craseaccent[] = {0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; //`
boolean _graveaccent[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1}; //´
boolean _different[] = {0,1,0,1,0,1,0,0,0,0,1,1,0,1,0,0,0,0,0,1,1,1,0,0,0,0,0,1,0,1,1,0,0,0,0,1,0,1,0,1}; //!=
boolean _at[] = {0,1,1,1,1,1,1,0,1,0,0,0,0,0,0,1,1,0,0,1,1,1,0,1,1,0,0,0,1,1,0,1,0,1,1,0,1,1,1,0}; //@
boolean _up[] = {0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0};
boolean _down[] = {0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0};
boolean _left[] = {0,0,0,0,1,0,0,0,0,0,0,1,1,1,0,0,0,0,1,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0};
boolean _right[] = {0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,1,0,0,0,0,1,1,1,0,0,0,0,0,0,1,0,0,0};
boolean _diveded[] = {0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0};
boolean _omega[] = {0,1,0,1,1,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,1,0,0,1,0,0,0,1,0,1,1,0,0,0};
boolean _pi[] = {0,1,0,0,0,1,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,1,0,0,0,1,1,1,1,1,0,0,0,1,0,0,0,1,0,0};
boolean _sum[] = {0,1,1,0,0,0,1,1,0,1,0,1,0,1,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,1};
boolean _grade[] = {0,0,0,0,0,1,1,1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
boolean _alpha[] = {0,0,1,1,1,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,1,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,1,1,0,0};
boolean _betha[] = {0,1,1,1,1,1,0,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,0,1,0,1,0,0};
boolean _deltha[] = {0,0,1,1,1,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,1,1,0,0,0,1,0,1,0,1,0,0,0,0,1,0,0,1,0,0};
boolean _tetha[] = {0,0,1,1,1,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1,1,1,1,0,0};
boolean _phi[] = {0,1,0,1,1,1,0,0,0,0,1,1,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,1,1,0,0,0,0,1,1,1,0,1};
boolean _Epson[] = {0,0,1,0,1,0,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,0,1,0,0,0,0,0};
boolean _rho[] = {0,1,1,1,1,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,0,1,1,0,0};
boolean _mu[] = {0,1,1,1,1,1,1,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,1,1,1};
boolean _circle[] = {0,0,0,1,1,1,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,1,1,1,0,0};
boolean _sphere[] = {0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1,0,0,0,0,1,1,1,0,0};
boolean _square[] = {0,1,1,1,1,1,1,1,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,1,1,1,1,1,1,1};
boolean _block[] = {0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1};
boolean _diamond[] = {0,0,0,0,1,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,0,0,1,1,1,0,0,0,0,0,0,1,0,0,0};
boolean _celcius[] = {0,0,0,0,0,0,1,1,0,0,1,1,0,0,1,1,0,1,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,1,0,0,1,0,0,0};
boolean _farenheight[] = {0,0,0,0,0,0,1,1,0,1,1,1,1,0,1,1,0,0,1,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0};
boolean _error[] = {0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,0,0,1,1,1,1,1,0,0};
boolean _musicnote[] = {0,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,1,0,0,0,0,1,1,1,0,0};
boolean _squareroot[] = {0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0};

//some emojis
boolean _smile[] = {0,0,1,0,0,0,0,0,0,1,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,1,0,0,0,1,0,0,0,0,0};
boolean _sad[] = {0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,1,0,0,0,1,0,0,0,0,0};
boolean _cry[] = {0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,1,0,1,1,0,0,0,1,0,0,0,0,0};
boolean _plane[] = {0,0,0,0,1,0,0,0,0,1,0,0,1,1,0,0,0,0,1,1,1,1,1,1,0,1,0,0,1,1,0,0,0,0,0,0,1,0,0,0};
boolean _heart[] = {0,0,0,1,1,0,0,0,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1,1,0,0,0};
boolean _solidheart[] = {0,0,0,1,1,0,0,0,0,0,1,1,1,1,0,0,0,1,1,1,1,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,1,0,0,0};


int _m;

void setup() {
  Serial.begin(9600);
  for (int Pin = 2; Pin <=11; Pin++) {
    pinMode(Pin, OUTPUT);
  }
  pinMode(sensorPin, INPUT);
}

void loop(){  
  State = digitalRead(sensorPin);
  if (State != lastState){
    if (State == HIGH){
      delayMicroseconds(10000);

      //put your message here, it will write a letter a time
      WriteLetter(F);
      WriteLetter1Width(space);
      WriteLetter(e);
      WriteLetter1Width(space);
      WriteLetter(l);
      WriteLetter1Width(space);
      WriteLetter(i);
      WriteLetter1Width(space);
      WriteLetter(z);
      WriteLetter(_);
      WriteLetter(_2);
      WriteLetter1Width(space);
      WriteLetter(_0);
      WriteLetter1Width(space);
      WriteLetter(_1);
      WriteLetter1Width(space);
      WriteLetter(_7);
      WriteLetter(_);
    }
    lastState = State;
  }
}

void WriteLetter(boolean letter[]){
  _m=0;
  //write 5 colunms
  for (int n=0; n<=4; n++){
    //write for 8 pins
    for (int Pin = 3; Pin <=10; Pin++) {
      //Serial.print(letter[m]);
      digitalWrite(Pin, letter[_m]);
      digitalWrite(2,HIGH);
      digitalWrite(11,HIGH);
      _m=_m+1;
    }
    delayMicroseconds(timer);
  }
}

void WriteLetter1Width(boolean letter[]){
  _m=0;
  for (int Pin = 3; Pin <=10; Pin++) {
    digitalWrite(Pin, space[_m]);
    digitalWrite(2,HIGH);
    digitalWrite(11,HIGH);
    _m=_m+1;
  }
  delayMicroseconds(timer);
}

void WriteLetter2Width(boolean letter[]){
  _m=0;
  for (int n=0; n<=1; n++){
    for (int Pin = 3; Pin <=10; Pin++) {
      digitalWrite(Pin, letter[_m]);
      digitalWrite(2,HIGH);
      digitalWrite(11,HIGH);
      _m=_m+1;
    }
    delayMicroseconds(timer);
  }
}



5 - Esta versão já contempla o relógio digital.
Observe que a biblioteca Time.h não funciona para as versões mais novas da IDE do arduino.
Todos os projetos foram feitos na versão 1.0.5 da IDE do arduino.
Baixe a biblioteca Time.h no GitHub da ArduinoByMySelf.
https://github.com/Arduinobymyself/Propeller_Message_Display


 /*
#####################################################################################
#   File:               ABMS_Propeller_Clock_v3_3.ino
#   Processor:          Arduino UNO, MEGA ou Teensy++ 2.0      
#   Language:           Wiring / C /Processing /Fritzing / Arduino IDE          
#           
#   Objectives:         To demonstrating the Persistence Of Vision (POV) effect by creating
#                       a LED gadget showing rotative messages  
#                     
#   Behavior:           By sinchronized rotating the LEDs will show a message
#                       using POV (shows a message and digital clock
#                           
#   Download:           https://github.com/Arduinobymyself/Propeller_Message_Display
#     
#   Author:             Marcelo Moraes 
#   Date:               02/01/17  
#   place:              Brazil, Sorocaba City 
#         
#####################################################################################

This project contains public domain code.
The modification is allowed without notice.
  
*/  
  
  
// defining the ASCII alphabet characters from the font.h library
#include "font.h"
//defining the time library to get hours, minutes, seconds and date
#include <Time.h>
  
// define the Arduino LED pins
const int LEDpins[] = {2,3,4,5,6,7,8,9,10,11}; //only 8 pins, 
                                               //pins 2 and 11 is for the inner and outter ring

// Total LED's in a row
int rows= 8;

const int charHeight = 8;
const int charWidth = 5;
  
int povDelay = 10;    //persistence of vision need 1/10 of second
int charDelay = 400;  //delay for letters

int State = 0;
int lastState = 0;
int i;
  
// sensor setup
int sensorPin = 12;  // define the Arduino sensor pin
                           // the sensor is a Reed Switch with pull down resistor 
                           // connected to the +5Vdc

//***************************************************
//put your message here
char textString[] = "ABMS Clock";
//***************************************************


String tmp_str;
  
void setup(){
  //setting time and date initial values
  setTime(22,35,30,2,1,2013);

  //reed switch sensor pin connected at pin 12 and is an input
  pinMode(sensorPin,INPUT);

  // all other pins are outputs (2,3,4,5,6,7,8,9,10,11)
  // the stick has 10 LEDs (8 for letters and 2 for the inner and outter ring)
  for (i = 0; i <= 11; i++){
    pinMode(LEDpins[i], OUTPUT);    
  }  
}
  
void loop(){
  tmp_str=Clock();
  tmp_str=tmp_str+" ";
  
  digitalWrite(2,HIGH);
  digitalWrite(11,HIGH);

  State = digitalRead(sensorPin); //get the sensor state
  if(State != lastState){//if sensor state changed
    if(State == HIGH){//if sensor state is high
      delayMicroseconds(povDelay); //POV delay 1/10 of second
      //printting the clock
      for (int k=0; k<tmp_str.length(); k++){
        printInvertedLetter(tmp_str.charAt(k));
      }
      //delayMicroseconds(povDelay); //POV delay 1/10 of second
      //printting the text
      for(int k=sizeof(textString)-1; k>-1; k--){
        printNormalLetter(textString[k]);
      }
    }
    lastState = State;
  }
}

//function that calculates the time to show in the display
//and mkes the number < zero adjustment
String Clock(){
  String result;
  String str1;
  String str2;
  String str3;
  if (hour() < 10)
    str1 = "0"+String(hour());
  else
    str1 = String(hour());
  if (minute() < 10)
    str2 = "0"+String(minute());
  else
    str2 = String(minute());
  if (second() < 10)
    str3 = "0"+String(second());
  else
    str3 = String(second());
    result = str1+":"+str2+":"+str3;
  return result;
}

//normal and forwards printted letters    
void printNormalLetter(char ch){
  // make sure the character is within the alphabet bounds (defined by the font.h file)
  // if it's not, make it a blank character
  if (ch < 32 || ch > 126){
    ch = 32;
  }
  // subtract the space character (converts the ASCII number to the font index number)
  ch -= 32;
  // step through each byte of the character array
  for (int i=charWidth-1; i>-1; i--) {
    byte b = font[ch][i];
    // ventilator draai tegen de klok in
    for (int j=0; j<charHeight; j++) {
      digitalWrite(LEDpins[j+1], bitRead(b,j));
    }
    delayMicroseconds(charDelay);
  }
  //clear the LEDs
  for (i = 0; i < rows; i++){
    digitalWrite(LEDpins[i+1] , LOW);
  }
  // space between letters
  delayMicroseconds(charDelay);
}  

//inverted (flipped) and backwards printed letters  
void printInvertedLetter(char ch){
  // make sure the character is within the alphabet bounds (defined by the font.h file)
  // if it's not, make it a blank character
  if (ch < 32 || ch > 126){
    ch = 32;
  }
  // subtract the space character (converts the ASCII number to the font index number)
  ch -= 32;
  // step through each byte of the character array
  for (int i=0; i<charWidth; i++) {
    byte b = font[ch][i];
    // ventilator draai tegen de klok in
    for (int j=0; j<charHeight; j++) {
      digitalWrite(LEDpins[j+1], bitRead(b, 7-j));
    }
    delayMicroseconds(charDelay);
  }
  //clear the LEDs
  for (i = 0; i < rows; i++){
    digitalWrite(LEDpins[i+1] , LOW);
  }
  // space between letters
  delayMicroseconds(charDelay);
}

Para mais comodidade, você pode fazer o download dos arquivos no GitHub abaixo:
https://github.com/Arduinobymyself/Propeller_Message_Display




VIDEOS E FOTOS:
PCB perfurada 21cm x 2,5


Arduino NANO, reed SW e pin header femea para o arduino e bateria Lipo

Trilhas de solda dos LEDs e resistores limitadores de corrente

LEDs e resistores limitadores de corrente

fiação dos LEDs

Conector para o Arduino NANO

Posicionamento do reed SW



Sistema Montado

Após verificação do balancemaneto, conexão do motor

O eixo do motor é um parafuso que foi fixado a placa perfurada (pafuso e porca)


Posicionamento dos imã de neodymiun, a quantidade e disposição é feito com testes


detalhes dos LEDs e resistores

detalhe do Arduino NANO

detalhe da bateria e da chave

detalhe das trilhas de solda

detalhe da fiação dos LEDs

Alguns vídeos de testes, vejam que a câmera também tem uma persistência... e é difícil de ajustar isso, no real a imagem parada, mas devido a câmera ela parece meio tremulante e passando uma barra na mensagem ou até mesmo cortando em certos períodos... há que se estudar sobre isso.... em andamento...















Youtube Vídeos:

https://youtu.be/dPM4S1ojVMw

https://youtu.be/2tO02IeQ968


https://youtu.be/41SCQT9RniA
Ainda faltam alguns ajustes e novos códigos (tal como relógio digital e analógico), mas já está em funcionamento e pronto para ser explorado.....
Também colocarei novos resultados no youtube....
Projeto em andamento.......