hello guys, i am trying to learn how to use the MAX7219 with the LedControl library so i searched and read about it here on this website and on other and made a the connection for 2 single digits 7-segment display CC of course to the MAX7219, the display number 0 is connected to the DIG 0 on the MAX and the display number 1 is connected to DIG 1 on the MAX and other segment are connected to the proper SEG on the MAX so i am trying to print individual numbers just to experiment but nothing is happening, the displays stays off, but when i remove one of the pins connected to arduino, the displays starts to flicker so i need help please to understand what is going on ?
here is my sketch:
//We always have to include the library
#include
/*
Now we need a LedControl to work with.
***** These pin numbers will probably not work with your hardware *****
pin 12 is connected to the DataIn
pin 11 is connected to the CLK
pin 10 is connected to LOAD
We have only a single MAX72XX.
*/
LedControl lc=LedControl(12,11,10,1);
void setup() {
/*
The MAX72XX is in power-saving mode on startup,
we have to do a wakeup call
*/
lc.shutdown(0,false);
/* Set the brightness to a medium values */
lc.setIntensity(0,15);
/* and clear the display */
lc.clearDisplay(0);
}
/*
This method will display the characters for the
word "Arduino" one after the other on digit 0.
*/
void writeArduinoOn7Segment() {
lc.setChar(0,0,'a',false);
delay(delaytime);
lc.setDigit(0, 0, 1, false);
}
/*
This method will scroll all the hexa-decimal
numbers and letters on the display. You will need at least
four 7-Segment digits. otherwise it won't really look that good.
*/
void loop() {
writeArduinoOn7Segment();
}