Ciao a tutti ragazzi,vorrei riuscire a pilotare la mia matrice di led 8x8 attraverso il max7219 che riceve da arduino 3 fili,ovvero :DIN,LOAD o CS ,e CLK.
Il mio problema è che quando scrivo lo sketch mi da sempre errore se includo le librerie :
#include <Sprite.h>
#include <Matrix.h>
che da quanto ho imparato,sono fondamentali per poter comandare la matrice di led.
Vi posto un semplicissimo codice :
#include <Matrix.h>
#include <Binary.h>
#include <Sprite.h>
Matrix myMatrix = Matrix(8, 10, 9);
void setup()
{
}
void loop()
{
myMatrix.clear();
delay(1000);
myMatrix.write(1, 5, HIGH);
myMatrix.write(2, 2, HIGH);
myMatrix.write(2, 6, HIGH);
myMatrix.write(3, 6, HIGH);
myMatrix.write(4, 6, HIGH);
myMatrix.write(5, 2, HIGH);
myMatrix.write(5, 6, HIGH);
myMatrix.write(6, 5, HIGH);
delay(1000);
}
In questo caso mi da questi errori :
sketch_feb27a:5: error: 'Matrix' does not name a type
sketch_feb27a.ino: In function 'void loop()':
sketch_feb27a:13: error: 'myMatrix' was not declared in this scope
ALTRO CODICE,ALTRI ERRORI :
#include "LedControl.h"
LedControl lc=LedControl(12,11,10,1);
void setup()
{
lc.shutdown(0,false);
lc.setIntensity(0,8);
lc.clearDisplay(0);
}
void loop()
{
for (int row=0; row<8; row++)
{
for (int col=0; col<8; col++)
{
lc.setLed(0,col,row,true);
delay(25);
}
}
for (int row=0; row<8; row++)
{
for (int col=0; col<8; col++)
{
lc.setLed(0,col,row,false);
delay(25);
}
}
}
sketch_feb27a.ino:1:25: error: LedControl.h: No such file or directory
sketch_feb27a:2: error: 'LedControl' does not name a type
sketch_feb27a.ino: In function 'void setup()':
sketch_feb27a:7: error: 'lc' was not declared in this scope
sketch_feb27a.ino: In function 'void loop()':
sketch_feb27a:17: error: 'lc' was not declared in this scope
sketch_feb27a:26: error: 'lc' was not declared in this scope
LA MIA DOMANDA QUINDI E' : PERCHE'???...
Ringrazio anticipatamente chi risponderà.