Triks-C and the Falcon Player

CaptainMurdoch

New member
Is there anyone around who has a Raspberry Pi with the Falcon Player, a LEDTriks with Triks-C, and a USB serial dongle to connect the Triks-C to the Pi running the Falcon Player?

I have an idea for the Falcon Player that I want to explore that would let you drive a LEDTriks w/ Triks-C as a monochrome matrix using regular sequence data. This would allow you to sequence your LEDTriks display in any sequencer that understands how to work with a matrix such as Nutcracker, Vixen 3, HLS, etc..

I'd like to provide a test perl script to run on the Pi. It would basically draw a frame of data onto the LEDTriks display. If that test script worked then I could look at adding the rest of the glue to allow the Triks-C to receive data from the Falcon Player.
 
I have a 2x2 LEDTriks (full setup) with Triks-C controllers and a PI w/FPP - only thing is that I haven't fired it up in a couple of years. I'll take a look at the setup and see if I can get it running. I know I have a few busted LEDs on that but that shouldn't affect things.
 
Thanks, I'll go ahead and create a test script just to make sure I can talk to the display before proceeding with the rest of the code.
 
OK - yanked it from the corner of the garage - only 3 LEDs out of 3,072 broken off - - not too bad for sitting for about 3 years... Anyway - had to rig up an RS232 cable with Renard interface format and waddya know - - the beast still works! I do have one panel of 4 that is out so I'll have to look at that (it's all powered up - just no output).

Will this support multiple panels like mine? There are four daisy-chained TRIKSC/LEDTriks boards in all via the single RS-232 interface from the PC.
 
I just got my Pi B+ in the mail and have a 1 x 2 TRIKSC/LEDTriks I can pull out of storage this weekend if you need a second set up for testing.
 
Budude, you will also need a USB to RS232 dongle to connect to the Pi. Do you have one of those?

If I can make it work, yes the plan would be to support up to 4 panels. I think the math works out to only allowing a 100ms refresh rate with 4 panels due to the com port speed. With 2 panels we might be able to achieve 50ms but I might just hardcode it to 100 initially.

XmasInGalt do you have a USB to serial adapter if budude doesn't and can't test.?
 
XmasInGalt do you have a USB to serial adapter if budude doesn't and can't test.?


I do. I just pulled it out to test a stop-gap option in case I need it. I'm connected a USB to serial adapter to the Pi and one to my old show PC. Set up 10 channels in my sequence (only need 1) for triggering based on the dimming level of that channel. Wrote a quick Basic program to monitor the com port on the PC and parsed the data stream for the sync byte then pulled the channel data and executed my batch file. Seems to be working but I would prefer the LEDTriks to Pi solution.

I'll pull out my LEDTriks this weekend and get it ready if needed.
 
This is very exciting. My LED Trix panel is a permant fixture on my house. Won't be hard to try it here too.

Sent from my SM-N9005 using Tapatalk
 
OK, I threw together a quick test Perl script to make sure I am reading the Triks-C spec correctly regarding outputting a frame of data to the display. The script does rely on the Perl Device::SerialPort module. This is not installed by default on our FPP v0.4.0 image, so you will need to install that by hand. Instructions are at the top of the script. Then you just need to optionally rename the script to .pl and run it on the Pi itself, either by marking it executable or running it via something like "perl ./triksc_test.pl".

The script talks to /dev/ttyUSB0 by default, so as long as you have only one serial dongle plugged in you shouldn't have to change anything in the script. When you run it, it will print out a bunch of lines showing you what it is doing. Basically all it does it send one frame of data to Triks-C unit #0. The script prints out a description of what the display should have looked like so you can confirm if the code worked or not, or if you want to take a quick picture and post it, that would be just as good.

It shouldn't matter whether this is run using RS232 or RS485 if your Triks-C supports RS485.

I made the assumption that the serial settings are 8N1 since that is what I believe Renard uses and the protocol is mentioned as being like Renard in the spec.

I had about 5 hours on the interstate driving today, so I thought through a lot of the FPP code for this, so if this does look like something that would work, I already have a good idea of how I will implement it, so it should be pretty easy to knock out for use for at least Christmas this year. I think I could get it done in time for prep for Halloween, but won't promise anything yet until I start messing with the code.

Thanks for testing this.
 

Attachments

  • triksc_test.pl.txt
    2.9 KB · Views: 38
Got the script on my FPP but don't have Internet access from it (for d/l the Serial lib) so messed around with a proxy on my laptop that did but couldn't get it to work. Will need to bring it inside and do the download - will let you know tonight hopefully... It appears my USB/Serial port is recognized as I see the dev link updated.
 
Got the script on my FPP but don't have Internet access from it (for d/l the Serial lib) so messed around with a proxy on my laptop that did but couldn't get it to work. Will need to bring it inside and do the download - will let you know tonight hopefully... It appears my USB/Serial port is recognized as I see the dev link updated.

Thanks. We are including that Perl module in the FPP v1.0 image since it is used in some of our example Event Scripts.
 
OK - - got the lib installed and ran the script - - the output on the display (#1) matches the output you expected so it looks good. What is the command code to write to the other boards so I can check that?


edit - nm - I figured it out after looking at the triks-c asm code. Pretty cool - made two patterns of all 1's and all 0's and can flash the entire panel on/off.

edit2 - took out all the printfs and looped up all 4 panels on/off - poor little supply is squeaking away...
 
Last edited:
That's great! Thanks for testing.

I have started writing a channel output driver in FPP to drive the Triks-C. I have the UI changes done and am working on the backend code to take the raw channel data and turn it into something the Triks-C can use.
 
That's great! Thanks for testing.

I have started writing a channel output driver in FPP to drive the Triks-C. I have the UI changes done and am working on the backend code to take the raw channel data and turn it into something the Triks-C can use.

Cool - or actually I should curse you because now I will have a reason after 5 years to box this thing up and finally use it... lol

Yeah - I used to be a Perl jockey back in the day - it's not exactly known for its speed - that script was running as fast as it could. Curious - is it necessary to send the Escape/Command sequence for each panel? It seems to be that way.
 
That perl code was a hack writing one byte at a time, the C code will write out the whole 98 bytes for a panel in one shot (sync + command + data).

Some of the logic to convert from raw channels to Triks-C format will be ugly but the goal is to make it fast. Calculating the single 8-bit bit-reversed value that corresponds to 8 non-contiguous channels in memory isn't fun. :) I have a helper for that done and am starting on the logic to step through the input channel array and dealing with output panel counts and positions.

Based on the spec we do need to send the sync and command bytes for every pane, but that is only 2 bytes out of 98 total so it's low overhead.
 
I wanted to post an update on the progress.

To help with writing the channel output driver in FPP, I made a preview function to deconstruct the data that would be sent to the Triks-C and draw it as a virtual 48x16 grid for each panel. Last night I tested the code with the various 1x?, ?x1, and 2x2 layouts and my preview function was showing the same data as the Nutcracker preview window. :) I have FPP running in bridge mode with a 'Triks-C' channel output defined and if I had an actual Triks-C attached, the LEDTriks should be blinking.

I need to do a little more work in the output timing code. When outputting to 4 panels we will have to drop to 100ms refreshes due to the amount of data we need to send so I need to put in some code to deal with that since the input sequence is probably meant to run at a faster rate. I am thinking this through because I would prefer to be able to run 2-3 panel layouts at 50ms if the sequence is 50ms.

I just wanted to let you know the code is almost there and it is working just like I envisioned. When done, you will be able to control a LEDTriks as if it were a pixel matrix.

In Nutcracker, for a single panel layout, I defined a horizontal matrix model with 16 strings of 48 pixels. For the effects, I used only red since the FPP code is only looking at the red channels during conversion so that it can be as fast as possible when running on the Pi.

When I do commit, this will only go in our master code branch for now since this will go into the upcoming v1.0 release. You will be able to test the code before then if you are running a v0.4.0 image since there is a developer page which let's you switch code branches to help test or debug.

I will post again when I have something ready to test.
 
I pushed the new code to the master branch of the FPP repository tonight. If you want to test, you need to make sure you can pull updates off the internet and switch to the master branch via the /developer.php page in the UI. There is no link to this page, you have to append /developer.php to the URL to get to it.

Triks-C is now listed as a channel output type. You select the start channel, serial port, and panel layout. The code supports horizontal layouts of 1-4 panels, vertical layouts of 1-4 panels, and a 2x2 layout. The top-left panel must be panel 1, then the numbering goes to the right and then down to the next row and so on.

To control the Triks-C/LEDTriks you will create a horizontal matrix model in Nutcracker or your sequencing tool. The matrix is defined as the number of pixels in your layout, so if you have a 2x2 layout then you would create a 96x32 matrix. The string config in the model should be 1 string per line, so that 96x32 matrix would have 32 'strings'. This puts the channels in the right order to be processed by the FPP code. The color order should be RGB, and only the 'R' channels are used since the LEDTriks is monochrome.

If you can run your FPP in bridge mode, you can actually drive the display from Nutcracker to test.

I'm double-posting this on the Falcon site, I'd prefer support and debugging be done over there, but will also be checking here as well for questions or bug reports.
 
Hi,
I had originally inquired about this a few month's back and just saw this thread. I too, am interested in using my LedTriks with my FPP this year. I have a 1x1 panel and also have a USB to serial adapter. I am not as quick as many of you regarding some of these setups, and would like to test it, but I don't quite know how to get the code into the FPP. I appreciate you taking the time to work on this.
Thanks.
 
The code is in the main development branch of FPP already so it can be tested now. If you are running the v0.4.0 version of FPP, you can point your web browser at http://YourFPPIP/developer.php

On that page, change the branch dropdown from v0.4.0 to 'master'. That will switch you over to the master branch which has support for the Triks-C.

Reboot with the USB dongle plugged in.

There is a new Triks-C channel output type. Select the USB port, start channel, and panel layout and save the config. Restart FPPD via the button on the main status page.

You sequence data for the display as a normal RGB matrix. The layout should be defined as horizontal, starting top left and with one string per row. If you have one panel, that would be a 48 wide by 16 tall matrix. FPP looks at only the red channel data since the LEDTriks is single color. This means only red values in your effects will be shown on the LEDTriks.

Hopefully that is enough to get you going.
 
Back
Top