I was taking a look at this project, of a 3X3 Led cube (http://arduino.cc/playground/Main/LEDCube3x3), and had some doubts concerning the code. I tried to found the answers in the Reference, but couldn’t understand it anyways.
The code can be directly accessed here: http://www.instructables.com/id/The-Arduino-LED-Cube/step5/Programming-Time/
I understand the meaning of each part, but still have some troubles with these issues:
1 - At the formation of the “PatternTable”, what is the function of the letter “B”, before each sequence defining a column of leds?
2 - When the pattern created should be displayed, the following command is used: “memcpy_P( PatternBuf, PatternTable+PatternIdx, PLANESIZE );”
It looks like this command copies each line of the PatternTable to be displayed. What happens then to the letters “B”?
3 - The basic element of the PatternTable has the format BXXX. In which part of the code is this element split, so that the information in each “X” may be obtained?
4 - What is the meaning of this syntax of the function digitalWrite: “digitalWrite( LEDPin[ledpin++], PatternBuf[patbufidx] & (1 << ledcol) );”.
Hopefully, somebody here has already built the cube and studied the code.