Parola for Arduino  1.0
Scrolling Text and Effects for Modular Parola Hardware
Designing and Implementing new text effects

Each of the selected text effects is implemented as a function. This makes adding new effects easy.

The effects functions are implemented as finite state machines. The function is called with the frequency set by the setSpeed() method, and the class variable _fsmState holds the state from the last call.

Each function is divided into 2 parts, one implementing the text move IN to the display (when the parameter bIn is true) and the other when the text is moving OUT of the display (bIn false). The first part starts with the INITIALISE state and ends when the state is set to PAUSE. The second phase starts with a PAUSE state and ends when the state is set to END. Because the IN and OUT effects can be different for a display cycle, the function must not assume that the first part was ever called just before the second, as this is not likely to be the case. The first phase should always end when the text is in its final position and the second phase should assume the text is in its proper starting position when called. Aside from the INITIALISE state (set by the displayReset() method), all other state changes are under the control of the effect functions.

The effects functions can work in one of 2 ways

Which method is used depends on the animation and what is convenient to for the coder, and examples of both are found in the standard library text effects.

The Parola library is implemented using the MD_MAX72xx library for hardware control. The origin for the LED matrix is on the top right of the display. This makes the leftmost column coordinate a higher column number that the one on the far right. Sometimes this is not intuitive when coding and is worth remembering. Rows are numbered from top to bottom.