RSeries astromech firmware
RSeries LogicEngine logics

Fiber-optic enhanced electronic logic displays. The kit includes two front logic displays (typically blue/white), one rear logic display (typically red/yellow/green).

Assembly instructions, code and source files are available at http://rseries.net/logic

Parts Run Information

https://astromech.net/forums/showthread.php?30271-RSeries-Logic-Engine-dome-lighting-kits-230-(Nov-2016)-Open

#include "ReelTwo.h"
#include "dome/Logics.h"
#include "i2c/I2CReceiver.h"
// Front Logic Device (Jawa ID#1)
LogicEngineDeathStarFLD<> FLD(LogicEngineFLDDefault, 1);
// Rear Logic Device (Jawa ID#2)
LogicEngineDeathStarRLDInverted<> RLD(LogicEngineRLDDefault, 2);
// LogicEngineControllerDefault reads the trimpots on the back of the board. It is optional.
//LogicEngineControllerDefault controller(FLD, RLD);
// Setup a i2c command receiver on address 0x10
I2CReceiver i2cReceiver(0x10);
void setup()
{
REELTWO_READY();
SetupEvent::ready();
// Scroll text for 15 seconds before switching to normal mode
FLD.selectScrollTextLeft("R2\n D2", LogicEngineRenderer::kBlue, 1, 15);
RLD.selectScrollTextLeft("... RSeries LogicEngine ....", LogicEngineRenderer::kYellow, 0, 15);
}
void loop()
{
AnimatedEvent::process();
}

PINS

The pins for front and rear logics are hard coded, and depend on the platform you are running.

Platform FLD RLD
Teensy 21 22
Zero 5 3
Mega 5 6
Arduino 6 6
ESP32 15 33

Note: Arduino only supports one board. Either front or rear, not both.

COMMAND INPUT

The RSeries use a command input string to tell it what effects combination should be run. This is comprised of a 7 digit long int. Leading 0's can be dropped

LEECSNN

L - the logic designator - if not provided, defaults to 0 (all)

0 - All (Logics and PSI) 1 - Front Logics 3 - Rear Logics 4 - Front PSI 5 - Rear PSI

EE - the effect - use two digits if logic designator provided

00 - Normal
01 - Alarm - flips between color and red with mic effects
02 - Failure - cycles colors and brightness fading - roughly timed to 128 screa-3.mp3
03 - Leia - pale green with mic effects
04 - March - sequence timed to Imperial March
05 - Single Color - single hue shown
06 - Flashing Color - single hue on and off
07 - Flip Flop Color - boards flip back and forth - similar to march
08 - Flip Flop Alt - other direction of flips on back board, front is same to flip flop
09 - Color Swap - switches between color specified and inverse compliment color
10 - Rainbow - rotates through colors over time
11 - Red Alert - shows color specified based on mic input
12 - Mic Bright - brightness of color specified back on mic input
13 - Mic Rainbow - color goes from default specified through color range based on mic input
14 - Lights Out - turns off displays
15 - Static Text
16 - Text Scrolling Left
17 - Text Scrolling Right
18 - Text Scrolling Up
19 - Roaming Pixel (pixel roams from top left to bottom right - for testing)
20 - Horizontal Scanline
21 - Vertical Scanline
22 - Fire 23 - PSI Swipe between two colours 24 - Pulse 99 - Select Random Effect
00 - Reset to Normal

C - color designator

1 - Red
2 - Orange
3 - Yellow
4 - Green
5 - Cyan (Aqua)
6 - Blue
7 - Purple
8 - Magenta
9 - Pink
0 - Default color on alarm / default to red on many effects / color cycle on march / ignored on failure and rainbow

S - speed or sensitivity (1-9 scale) with 5 generally considered default for speed

Flip Flop and Rainbow - 200ms x speed
Flash - 250ms x speed
March - 150ms x speed
Color Swap - 350ms x speed
Red Alert - sets mic sensitivity - as a fraction of speed / 10 - we recommend 3
Mic Bright - sets minimum brightness - fraction of speed / 10

NN - 2 digit time length in seconds

00 for continuous use on most
00 for default length on Leia
Not used on March or Failure

Some sequence examples:

Note: Leading 0s drop off as these are long ints
Solid Red: 51000
Solid Orange: 52000
Solid Yellow: 53000
Solid Green: 54000
Solid Cyan: 55000
Solid Blue: 56000
Solid Purple: 57000
Solid Magenta: 58000
Solid Pink: 59000
Alarm (default): 10500
Failure: 20000
Leia: 30000
March: 40500
March (Red Only): 41500
Flash (Yellow): 63500
Color Swap (pink): 99500
Rainbow: 100500
Red Alert: 111300
Mic Bright (Green): 124200
Mic Rainbow (Cyan): 135000
Fire: 220000
Pulse front PSI: 4241100

54008 - solid green for 8 seconds
63315 - flashing yellow at slightly higher speed for 15 seconds
30008 - leia effect for only 8 seconds

See some of these effects in the video release by IOIIOOO by clicking below:

Demo Video

MARCDUINOS / JAWALITE / TEECES

Input from Marcduinos work with either I2C (if using the Marcduino v2 firmware) or JAWALITE (default serial commands)

Marcduinos use a sequence of &<i2caddress>,"<i2ccommand>\r for I2C commands So for example, to send to the default Teensy a command for static green, you would use:

&10,"54000\r

If sending more than one command in a sequence, put a few \p in between for pauses

&10,"54000\r\p\p\p&11"54000\r

The above would send the static green to both front and read AVR boards on the default I2C assignment

To pass commands via Jawalite (default Marcduino commands) connect the serial out on the Marcduino (Teeces out) to the UART Rx input on the Teensy board.

SOME OTHER USEFUL LINKS

JawaLite Command Information: https://github.com/joymonkey/logicengine/wiki/JawaLite-Commands

The Logic of Logic Displays: https://github.com/joymonkey/logicengine/wiki/The-Logic-of-Logic-Displays

Developer Notes: https://github.com/joymonkey/logicengine/wiki/Developer-Notes

Calculate HSV Color Values: http://rseries.net/logic2/hsv/

Explanation of how "Tween" colors are implimented: http://rseries.net/logic2/color/?keys=4&tweens=4

+ Collaboration diagram for RSeries LogicEngine logics: