Background:
Components:
(2x) MAX7221cng
(2x) "221" Capacitors
(2x) 10kohm resistors
Board printed by oshPark
3x Common cathode 3 digit 7 segment LED displays
Schematic:
See page 13
Sketch:
//We always have to include the library
#include "LedControl.h"
/*
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 6 is connected to LOAD
We have TWO single MAX72XX.
*/
LedControl lc=LedControl(12,11,6,2);
void setup() {
/*
The MAX72XX is in power-saving mode on startup,
we have to do a wakeup call on both MAX's
*/
lc.shutdown(0,false);
/* Set the brightness to a medium values */
lc.setIntensity(0,8);
/* and clear the display */
lc.clearDisplay(0);
lc.shutdown(1,false);
/* Set the brightness to a medium values */
lc.setIntensity(1,8);
/* and clear the display */
lc.clearDisplay(1);
}
void loop() {
lc.setChar(0,0,1, false);
lc.setChar(0,1,2, false);
lc.setChar(0,2,3, false);
lc.setChar(1,0,4, false);
lc.setChar(1,1,5, false);
lc.setChar(1,2,6, false);
lc.setChar(1,3,7, false);
lc.setChar(1,4,8, false);
lc.setChar(1,5,9, false);
}
At first I thought, power issue. I am using a car battery connected to the RAW input. No dice
Then I used my 5v regulator (same one that powers a RPi carputer for ECU data logging). No dice
Then I sent 5v through the USB pins on the mini. No dice
Then maybe the sketch was too complicated. I made a simpler one. no dice.
What gives?
The mini only works when the usb is connected. The LEDs flash on first power up, but that is all before the sketch actually begins.
This particular one is a chinese knockoff. The authentic one I have does the same (this is just the last configured one I had to take pics since I thought maybe I fried the original.