Closed Bielousov closed 6 years ago
I feel you need to learn about SPI first. :) Check this page: https://www.arduino.cc/en/Reference/SPI (It is also referenced in the comment you marked.)
For your example: (@bartoszbielawski : Maybe you can add it to the readme?)
MAX7219 driven LED Matrix usually requires 3 signals:
On the Arduino Uno MOSI is on pin D11 and CLK on pin D13. You can use any digital capable pin of your Adruino for ChipSelect (CS) as long as it is not one of the SPI pins or used by other technologies: eg. using D0 and D1 would be possible but break your Serial Interface.
Pin D9 is not used for SPI on the UNO. Again see: https://www.arduino.cc/en/Reference/SPI Same page is referenced in the comment.
(Dont use the SS or MISO pin of your Arduino!): Why? What would happen if I use one of those?
... you would break SPI ;-) - It is not going to destroy anything but it won't work.
The comment about pins selection is very unclear and conflicting in all example sketches, i.e. here
> Define the ChipSelect pin for the led matrix
CS
pin be one of SPI pins (default pin9
isn't on most Arduinos)?don't use the SS or MISO
, then if it's SPI, it must be MOSI (11
in many cases, why not use it as default?).> (Dont use the SS or MISO pin of your Arduino!)
> "MOSI=DIN of the LEDMatrix and CLK"
CS
(see above) assuming it would be SPI, so CS shouldn't be a SPI pin then?Please provide more guidance on selecting pins, perhaps with example using the most popular Arduino Uno and MAX7219 matrix.