That’s what I’m using. The only pin connected from the mbuino is spi data out to the led data in.
Some versions of the mbed library don’t like the clock or data in pins being unassigned, since I didn’t need the pins for anything else they are assigned to the spi bus but not connected to anything. It saves worrying about the library version.
The spi bus is used to give the required timing, you need sub us timing accuracy and that’s the easiest way to achieve it. It actually transmits 3 bits per bit of led data to generate the correct timings.
@ AndyA - Got it working with your cylon code, and as expected, the LEDs are zig-zagging…still a pretty cool effect.
I’m not lighting the whole matrix, since I’m running off the 3v3 pin on the mBuino. For some reason, I can’t seem to get an external power source to work…may be that I don’t have it wired up correctly, or perhaps per your discussion with Daddy-Oh, voltage is too high to allow the signal pin to trigger the LEDs.
I’ve got a GHI Gadgeteer battery module with 4x AA cells, which is producing about 5.5v, so I’m guessing that the signal pin isn’t reading high because of the disparity between the source voltage and the signal pin. I’ve got a breadboard PS that will output 3v3, so I can test with that next.
Then I can tackle some code to allow addressing the matrix using a 2-dim array.
@ AndyA - One more update…got everything working with external power, using my breadboard supply at 3v3 and a wall wart. So it looks like I was running into the same issue with respect to supply voltage vs. signal ratio.
Thanks so much for your code…it will provide a nice jumping off point.
As a more complex example this code will display text.
It requires at least 5 rows vertically and 6 columns (5 lit plus 1 for a gap) per character.
Rows can be wired all going left to right or alternating direction. It is assumed that the top row is left to right, I should fix that at some point.
The actual LED driver is unchanged, this is purely a more complex way to populate the data array it uses.
Okay I hooked up a level shifter and supplied 5V to the high side of the level shifter and to the mBuino. The control signal passes from the mBUino to the low side data line 1 on the level shifter and the high side data line feeds the neoPixel data line.this works.
I feed 3 V from mBuino to the low + side of the level shifter.
I go through your project, i think i have to write my own prohram, the long term aim is to support 5 rows of 100+ LEDs and then display and animate text, but the core code for pushing the data out ended up will be very similar. It was using the same busrtSPI library to drive the data line.