Teeces Dome Lights
Teeces Logics Dome Lights
The Teeces Lights is an openly available PCB board set for the Front and Rear Logics and the PSI displays on a R2 dome.
There is also a pre-build run available (as of April 2017):
The Teeces Lights are controlled by an Arduino Pro Mini, Arduino Micro, or Sparkfun Pro MicroArduino plugged into the back of the board. I have made an improved sketch for the this Arduino that allows it to respond to the R2 Touch app. With my sketch, you can display messages on the logics, and the lights respond to various effects controlled by R2 touch. See the video demo below.
You should also probably use my sketch with the Teeces hardware even if you don't use the R2 Touch/MarcDuino system, as it is an improvement over the standard "universal sketch" in all respects
Building your Teeces Hardware
The Teeces hardware is not my design. It was designed by John Vannoy, who used the username Teeces on the Astromech forum. There is a Wiki page on Astromech.net that explains the Teeces dome lights
The PCB boards can be bought there
A very good manual that explains how to assemble these is on JoyMonkey's Teeces website, and is available for download from this site too (third link below):
The components needed are listed below.
Here are the three different Arduinos that you can plug into the board. I highly recommend to use an Arduino Pro Mini and it's attendant FTDI programmer. The two "micro" versions of the Arduino have USB on board. But the Arduino Micro is too large and the Sparkfun Pro Micro is much too difficult to upload by a beginner (or in my case, an advanced) user - it's a driver, file extension and reset mess. Once you get it to work it's OK, but it took me a day. No such issues with the Mini. That said, they all work with my sketch.
Installing and configuring the CuriousMarc Teeces code
You'll need the Arduino Environment program to configure and upload the code. Download and install from here. I used 1.0.5:
Run it once so it asks you to create your sketch folder.
WARNING: You will need to download TWO files below, which will expand into two folders:
The TeecesControl folder is a library, and should go into your into a Library folder inside your Arduino sketch folder (i.e. the Library folder should end up next to the Teeces_CuriousMarc folder you'll create below, not in it).
The Teeces_CuriousMarc is the sketch that you need to open and download to the Arduino after you have configured it, the whole folder goes into your Arduino sketch folder.
Open the Teeces_CuriousMarc sketch inside the folder by double clicking it, it should launch the Arduino environment. Scroll down a few lines until your reach the configuration lines that look like this:
CuriousMarc's Teeces Sketch Download Links
You need to download BOTH TeecesControl and put that in the library folder, and one version of the Teeces_CuriousMarc_v1.x.
Preparing and Uploading the sketches
Before you upload your sketch, you need to slightly edit a few lines at the beginning of the sketch it to match your hardware. Change the BOARDtype value to match your board (in my case I use a SparkFun Pro Micro, I'd have to change the value to 2). Also there several versions of the PSI boards LED arrangements. If you have one of the older ones, change the PSItype to the correct one. 2400 is the right baud rate to connect to the current (v.1.5) version of the MarcDuino HP Controller, so you should leave that alone.
Make sure you have placed the TeecesControl in the library folder, and the edited Teeces_CuriousMarc_xxx in the sketch folder.
Next you will need to upload your code. If you are unfamiliar with this step, refer to the Arduinio website. Basically, make sure you go into the Tools->Board menu and select your correct board type. Next, if you use a FTDI programmer, go to the Tools->Serial Port menu and make sure you select the COM port to which your FTDI programmer has attached itself. The click on the green circle arrow pointing to the right to compile and upload your code. The Teeces lights should come on right after the upload is finished.
Connecting the Teeces lights to the MarcDuino
The Teeces connects to the Slave Marcduino. Refer to your your MarcDuino version pages for the proper connection diagram. In general, apart from power, you'll need two wires:
One between the two grounds of the Teeces and MarcDuino. If you power the two using the same source, this ground wire is not even necessary.
Another wire from the Lights output on the MarcDuino Slave to the wire marked RXI or RX0 on your board.
The Holoprojector lights are not controlled by the Teeces. Connect them directly to the Slave MarcDuino as shown in the diagrams.
That's it, your Teeces logics and PSIs should respond to all the regular R2 Touch app commands and effects.
CuriousMarc's Teeces Command Reference (advanced)
When running my sketch, the Teeces Lights responds a full set of JawaLite commands. You can use the Teeces with the R2Touch and MarcDuino bords, or with your own Arduino based system. If using your own system, send commands via serial (at a pokey 2400 bauds to be backwards compatible with the JEDI display).
This section describes the implemented commands. Most JawaLite commands found on the JEDI display are implemented, completed by a few CuriousMarc's Teeces commands that add more functionality.
The command reference, available within the sketch, is reprinted below (as of version 1.1):
// Command language reference - JEDI JawaLite emulation
JawaLite command syntax uses plain text format, followed by a carriage return.
Format is address - command letter - value:
where xx= address (one or two chars), Y=command letter, zzz=optional argument, <cr>= carriage return character ('\r'=0x13)
The address field is interpreted as follows:
0 - global address, addresses all the displays that support the command
1 - TFLD (Top Front Logic Dislay)
2 - BFLD (Bottom Front Logic Display)
3 - RLD (Rear Logic Display)
4 - Front PSI
5 - Rear PSI
6 - Front Holo (JEDI only, not implemented in Teeces)
7 - Rear Holo (JEDI only, not implemented in Teeces)
8 - Top Holo (JEDI only, not implemented in Teeces)
Implemented commands (indicated durations are the sketch defaults, they are adjustable, see below):
0-5T0 - test (switches all logics to on)
0-5T1 - display to normal random
0T2 - flah, same as alarm
0T3 - alarm for 4 seconds (flashes displays on and off)
0T4 - short circuit (10 seconds sequence)
0T5 - scream, same as alarm
0T6 - leia, 34 seconds (moving horizontal bar)
0T10 - Star Wars. Displays "Star Wars" on RLD, "STARS" on TFLD, "WARS" on BFLD
0T11 - March (alternating halfs of logics, 47 seconds)
0-3T92 - spectrum bargraph displays. Runs forever, reset by calling 0T1
0-3T100 - Text display. Displays text set by the M command below
6T1, 7T1, 8T1 -> holos on - JEDI HP lights wired to and controlled by MarcDuino boards.
0D, 6D, 7D, 8D -> holos off - not implemented, HP lights wired to and controlled by MarcDuino boards.
Command M, set message for the text. 0= all logics, 1=TFLD, 2=BFLD, 3=RLD
0-3Mmessage - where "message" is an ASCII string to be displayed. Only uppercase implemented.
Command P, character set
0-3P61 - swtich display to aurabesh characters
0-3P60 - switch display to latin (e.g.english) characters
Extended "CuriousMarc Teeces" commands:
Extra command T to turn displays off
Command R, adjusts random style appearance:
0-3Rx where x=0 to 6.
Command S, PSI state
0,4-5S0 - PSI all on (same as 4-5T0)
0,4-5S1 - PSI normal mode (same as 4-5T1)
0,4-5S2 - PSI first color
0,4-5S3 - PSI second color
0,4-5S4 - PSI off
v1.3 Member Budi67 and I added the numbers 4 to 9, now showing correctly in the Latin alphabet. I have not fixed the Aurabesh numbers yet, only number 2 will show in that alphabet.
v1.4 Member Eebel fixed the light pattern for PSI of type 3. Thanks Eebel!