Hello
I am new to Arduino. Trying to build a Flight Simulator Project.
I have 3 Max7219 7 segment displays, i tested one of them yesterday with a sample from the web, was working perfect.
Today i kept on testing, but used another sample for link2fs.
Didn't work, after investigating, i found that the comment in the file for the pins, was wrong, and i didn't notice it and wrote them in like so.
By that i switched the Load and Clock Pins.
My Pins are 4 Data, 3 Clock, 2 Load.
Code used: LedControl led_Display_1 = LedControl(4,2,3,3);
Should be: LedControl led_Display_1 = LedControl(4,3,2,3);
That correct ?
If so, are my Chips now fried ?
The light up on start, all leds, but then nothing.
If they are chained as 3, only the second one works and displays the sample.
If i only hook up the second one, alone it does not work either.
I tried various pins on my mega, tested with alot of different code.
Checked if hooked up right.
Any help is appreciated.
Thanks
Sample code:
#include "LedControl.h" // need the library
LedControl lc=LedControl(40,42,44,1); // lc is our object
void setup()
{
lc.shutdown(0,false);
delay (500);
lc.shutdown(1,false);
delay (500);
lc.shutdown(2,false);
lc.setIntensity(0,4);// sets brightness (0~15 possible values)
lc.setIntensity(1,4);// sets brightness (0~15 possible values)
lc.setIntensity(2,4);// sets brightness (0~15 possible values)
lc.clearDisplay(0);
lc.clearDisplay(1);
lc.clearDisplay(2);
}
void loop()
{
//1st
for (int a=0; a<8; a++)
{
lc.setDigit(0,a,a,true);
delay(100);
}
for (int a=0; a<8; a++)
{
lc.setDigit(0,a,8,1);
delay(100);
}
for (int a=0; a<8; a++)
{
lc.setDigit(0,a,0,false);
delay(100);
}
for (int a=0; a<8; a++)
{
lc.setChar(0,a,' ',false);
delay(100);
}
for (int a=0; a<8; a++)
{
lc.setChar(0,a,'-',false);
delay(100);
}
for (int a=0; a<8; a++)
{
lc.setChar(0,a,' ',false);
delay(100);
}
//2nd
for (int a=0; a<8; a++)
{
lc.setDigit(1,a,a,true);
delay(100);
}
for (int a=0; a<8; a++)
{
lc.setDigit(1,a,8,1);
delay(100);
}
for (int a=0; a<8; a++)
{
lc.setDigit(1,a,0,false);
delay(100);
}
for (int a=0; a<8; a++)
{
lc.setChar(1,a,' ',false);
delay(100);
}
for (int a=0; a<8; a++)
{
lc.setChar(1,a,'-',false);
delay(100);
}
for (int a=0; a<8; a++)
{
lc.setChar(1,a,' ',false);
delay(100);
}
//3rd
for (int a=0; a<8; a++)
{
lc.setDigit(2,a,a,true);
delay(100);
}
for (int a=0; a<8; a++)
{
lc.setDigit(2,a,8,1);
delay(100);
}
for (int a=0; a<8; a++)
{
lc.setDigit(2,a,0,false);
delay(100);
}
for (int a=0; a<8; a++)
{
lc.setChar(2,a,' ',false);
delay(100);
}
for (int a=0; a<8; a++)
{
lc.setChar(2,a,'-',false);
delay(100);
}
for (int a=0; a<8; a++)
{
lc.setChar(2,a,' ',false);
delay(100);
}
}