Project in progress
Easy Spectrum Display Arduino and Lego

Easy Spectrum Display Arduino and Lego

This is an easy spectrum display.

  • 1,999 views
  • 0 comments
  • 2 respects

Components and supplies

About this project

This is an easy spectrum display. Construction was simple, but writing the code caused problems.

Blink film is caused by my camera. It captures only 30 fps.

Code

spectrum.inoArduino
int _[] = {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};
int A[] = {1,1,1,1,1,1,1,1,0,0, 0,0,0,1,1,0,0,0,1,1, 0,0,0,1,1,0,0,0,1,1, 1,1,1,1,1,1,1,1,0,0};
int B[] = {1,1,1,1,1,1,1,1,1,1, 1,1,0,0,1,1,0,0,1,1, 0,1,1,0,1,1,0,1,1,0, 0,0,0,1,1,1,1,0,0,0};
int C[] = {0,0,1,1,1,1,1,1,0,0, 0,1,0,0,0,0,0,0,1,0, 1,0,0,0,0,0,0,0,0,1, 0,1,0,0,0,0,0,0,1,0};
int D[] = {1,1,1,1,1,1,1,1,1,1, 1,1,0,0,0,0,0,0,1,1, 0,1,1,0,0,0,0,1,1,1, 0,0,0,1,1,1,1,0,0,0};
int E[] = {1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1, 1,1,0,0,1,1,0,0,1,1, 1,1,0,0,1,1,0,0,1,1};
int F[] = {1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1, 0,0,0,0,1,1,0,0,1,1, 0,0,0,0,1,1,0,0,1,1};
int G[] = {0,0,1,1,1,1,1,1,0,0, 0,1,1,0,0,0,0,1,1,0, 1,1,0,1,0,0,0,0,1,1, 0,1,1,1,0,0,1,1,1,0};
int H[] = {1,1,1,1,1,1,1,1,1,1, 0,0,0,0,1,1,0,0,0,0, 0,0,0,0,1,1,0,0,0,0, 1,1,1,1,1,1,1,1,1,1};
int I[] = {1,1,0,0,0,0,0,0,1,1, 1,1,1,1,1,1,1,1,1,1, 1,1,1,1,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dwa[] =         {1,1,1,0,0,0,1,1,1,0, 1,0,1,1,1,0,0,0,1,1, 1,0,0,0,1,1,1,0,1,1, 1,0,0,0,0,0,1,1,1,0};
int trzy[] =        {0,0,1,1,0,0,0,1,1,0, 1,1,0,0,1,1,0,0,1,1, 1,1,0,0,1,1,0,0,1,0, 0,1,1,1,1,1,1,1,1,0};
int cztery[] =      {0,0,0,1,1,1,0,0,0,0, 0,0,0,1,0,1,1,1,0,0, 1,1,1,1,1,0,0,1,1,1, 0,0,0,1,0,0,0,0,0,0};
int piec[] =        {1,0,0,1,1,1,1,1,1,1, 1,1,0,1,1,0,0,0,1,1, 1,1,0,1,1,0,0,0,1,1, 0,1,1,1,0,0,0,0,1,1};
int szesc[] =       {0,1,1,1,1,1,1,1,1,0, 1,0,0,0,1,0,0,0,1,1, 1,0,0,0,1,0,0,0,1,1, 0,1,1,1,0,0,0,1,1,0};
int siedem[] =      {1,1,1,0,0,0,0,0,0,1, 0,0,1,1,1,0,0,0,0,1, 0,0,0,0,1,1,1,0,0,1, 0,0,0,0,0,0,1,1,1,1};
int osiem[] =       {0,1,1,1,0,1,1,1,1,0, 1,0,0,0,1,1,0,0,0,1, 1,0,0,0,1,1,0,0,0,1, 0,1,1,1,0,0,1,1,1,0};
int dziewiec[] =    {0,1,1,1,1,1,1,1,1,0, 1,1,0,0,0,1,0,0,0,1, 1,1,0,0,0,1,0,0,0,1, 0,1,1,0,0,0,1,1,1,0};
int zero[] =        {0,0,1,1,1,1,1,1,0,0, 1,1,0,0,0,0,0,0,1,1, 1,1,0,0,0,0,0,0,1,1, 0,0,1,1,1,1,1,1,0,0};



void setup(){

  
  pinMode(1, OUTPUT);
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
}

void printLetter(int letter[]){
  
  int y;
  
  // 1 row letter
  for (y=0; y<10; y++){
    digitalWrite(y+1, letter[y]);
  }
  delay(2);
  
  // 2 row letter
  for (y=0; y<10; y++) {
    
    digitalWrite(y+1, letter[y+10]);
  }
  delay(2);
  
  // 3 row letter
  for (y=0; y<10; y++){
    
    digitalWrite(y+1, letter[y+20]);
  }
  delay(2);
  
  // 4 row letter
  for (y=0; y<10; y++){
    
    digitalWrite(y+1, letter[y+30]);
  }
  delay(2);
  
  // the spacing between letters
  for (y=0; y<10; y++){
    
    digitalWrite(y+1, 0);
  }
  delay(6);
}


void loop()
{
 printLetter(I);
 printLetter(S);
 printLetter(_);
 printLetter(C);
 printLetter(O);
 printLetter(O);
 printLetter(L);
 
 delay(26);     
   
}

Schematics

widmo.jpg
Widmo

Comments

Similar projects you might like

GPS Location Display With GPS And TFT Display Shields

Project tutorial by Boian Mitov

  • 16,767 views
  • 6 comments
  • 36 respects

Bluetooth control led with lcd led status display real time.

Project tutorial by Youssef Sabaa

  • 28,511 views
  • 6 comments
  • 54 respects

Control a 7 Segment Display with a keypad!

Project tutorial by Isaac100

  • 17,912 views
  • 18 comments
  • 25 respects

Lego Compatible Name Display

Project tutorial by Lunchbox Electronics

  • 3,332 views
  • 0 comments
  • 6 respects
Add projectSign up / Login