Skip to content

The Logic of Logic Displays

joymonkey edited this page Oct 12, 2016 · 1 revision

#The Logic Engine Goal R2-D2's logic displays in the original trilogy were comprised of a motorized color wheel and fiber-optic assembly. The color wheel for the front logic featured blue and white colors, so as the color wheel rotated and a light source shined from behind it, each strand of fiber optic cable would appear to transition between shades of blue and white. This resulted in an almost organic appearance, very different to the direct LED look that many R2 Builders have become accustomed to.
With the Logic Engine we aim to replicate the original trilogy logic display appearance using modern hardware, allowing the user individual control of each logic "pixel".

#How Key, Tween and Bizarro Colors work Say we have 4 KEY colors, with 4 tweens between each one. So 16 color total (48 bytes)

00 ,01,02,03,04, 05 ,06,07,08,09, 10 ,11,12,13,14, 15

In the standard logic patterns, each pixel cycles up through all these colors, pausing a little longer on the Key colors. When the pixel reaches the top, it reverses back through the same colors.
To prevent us from having to store the colors twice or storing the "direction" of each pixel within the color palette (both wasting precious SRAM), we just pretend that we have 30 colors.
The colors from 16 to 29 are a mirror image of the colors from 01 to 14, so we refer to them using the technical term "Bizarro". We use a small helper function to check if a color is bizarro, and then treat it like its real color equivalent.
For more key/tween/bizarro info see http://rseries.net/logic2/color/?keys=4&tweens=4

The Key colors are defined in advance. The tweens are calculated at setup() and all colors are then stored in SRAM. The LED status structs are also sored in SRAM. LED-to-pixel mapping is stored in flash.

See the Pages above for info relevant to the Logic Engine.

Here are some handy external links...

Clone this wiki locally