citrus-it / picube

Raspberry Pi Linux Software for the SuperTech-IT 8x8x8 RGB LED Cube
http://picube.uk/
MIT License
6 stars 3 forks source link

Question on pixel mapping #4

Closed ve3sjk closed 4 years ago

ve3sjk commented 4 years ago

Not sure if this project is active ported the Super big show a couple years ago to run a different cube hardware on the UC32. I am looking to port this to the same cube.

My hardware uses only 1 data line instead of 3 and uses a shift register on the anode drivers so the data is a stream of r,g,b intensity values followed by the last 8 bits which control the anodes or layer select.

Can anyone point me to which files in this project i would look at as far as how the data is shifted out and the cube is updated as well as the origin (0,0).

citrus-it commented 4 years ago

I haven't made any changes here for a while but I still use the code and the cube.

The function you need to look at is cube_refresh() in cube.c https://github.com/citrus-it/picube/blob/master/cube.c#L559

It cycles through the layers, and for each layer it shifts out the data on the separate red, green and blue pins then activates the layer for the required time. There's a comment above the function that explains how it works in regard to the bit angle modulation that controls brightness.

That shouldn't be too hard to convert for a different cube -ask if you have any further questions or hit any problems.

ve3sjk commented 4 years ago

Thanks for the information that was the routine I was looking for since the code is so close to the UC32 code for the Super Big Show its not going to take me long to switch it over for my cube. Going to have to wait a bit since the current exchange rate from Canadian to US dollars are so high right now i cannot find a price lower than 150 cad on a raspberry PI at the moment which is just crazy, not sure what covid19 has to do with a raspberry PI but with the high exchange rate and the virus the price has nearly tripled on here in Canada.