wpatterson Posted November 26, 2013 Report Share Posted November 26, 2013 (edited) I am building a controller that will have 16 encoders with individual LED rings. Each ring will consist of 12 RGB LEDs (11 around the encoder and 1 below it). I want to use two DOUT modules to control them. The first and second SRs will send signals to the 12 cathode rows. The third and fourth SRs will send signals to the red anodes. The fifth and sixth SRs will send signals to the green anodes. And finally the seventh and eighth SRs will send signals to the blue anodes. I have included a schematic: Does anyone have any suggestions about programming this? Edited November 26, 2013 by wpatterson Quote Link to comment Share on other sites More sharing options...
TK. Posted November 26, 2013 Report Share Posted November 26, 2013 First of all: a 16x16 matrix is a bad choice, please layout two 8x16 matrices instead, so that the LEDs are brighter. Then you will be able to configure the matrices with: DOUT_MATRIX n=1 rows=8 inverted=0 sr_dout_sel1=1 sr_dout_r1=2 sr_dout_r2=3 sr_dout_g1=4 sr_dout_g2=5 sr_dout_b1=6 sr_dout_b2=7 DOUT_MATRIX n=2 rows=8 inverted=0 sr_dout_sel1=8 sr_dout_r1=9 sr_dout_r2=10 sr_dout_g1=11 sr_dout_g2=12 sr_dout_b1=13 sr_dout_b2=14 with a 8x16 matrix, you will get 8 hues per colour (makes 512 possible colors) The hue can be passed with the rgb parameter. E.g. let's say an encoder is mapped to 4 banks, you can specify: EVENT_ENC id=100 hw_id = 1 bank=1 fwd_id=LED_MATRIX:1 rgb= 7:0:0 fwd_to_lcd=1 type=CC chn= 1 cc= 16 lcd_pos=1:1:1 label="ENC #%3i %3d@(1:1:2)%B" EVENT_ENC id=200 hw_id = 1 bank=2 fwd_id=LED_MATRIX:1 rgb= 0:7:0 fwd_to_lcd=1 type=CC chn= 1 cc= 16 lcd_pos=1:1:1 label="ENC #%3i %3d@(1:1:2)%B" EVENT_ENC id=300 hw_id = 1 bank=3 fwd_id=LED_MATRIX:1 rgb= 0:0:7 fwd_to_lcd=1 type=CC chn= 1 cc= 16 lcd_pos=1:1:1 label="ENC #%3i %3d@(1:1:2)%B" EVENT_ENC id=400 hw_id = 1 bank=4 fwd_id=LED_MATRIX:1 rgb= 7:7:0 fwd_to_lcd=1 type=CC chn= 1 cc= 16 lcd_pos=1:1:1 label="ENC #%3i %3d@(1:1:2)%B" to change the LED ring color depending on the bank Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
wpatterson Posted November 26, 2013 Author Report Share Posted November 26, 2013 Thank you for replying so quickly! Also, do I still specify the LED_MATRIX_PATTERN the same way? for example: LED_MATRIX_PATTERN n= 1 pos= 0 pattern=1000000000000000 Thanks, Harry Patterson Quote Link to comment Share on other sites More sharing options...
TK. Posted November 26, 2013 Report Share Posted November 26, 2013 If you don't specify the LED_MATRIX_PATTERNs, MBNG will take the defaults which are documented here: http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fcontrollers%2Fmidibox_ng_v1%2Fcfg%2Fdefault%2Fdefault.ngc If you don't like the defaults, then just customize the predefined patterns. Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
wpatterson Posted November 27, 2013 Author Report Share Posted November 27, 2013 Say I wanted to be able to use banks to control the color of the LEDs and 4 different banks within the same encoders but with different CCs. I know I could have use one encoder to scroll through each individual bank and the colors, but is there a way that I could use one encoder to scroll through groups of 12 banks and another encoder to change the color of the leds? For example: Encoder 1: changes the CC of each led via banks Encoder 2: scrolls through rgb banks of LED rings (the range would be 1 to 12) Thanks, Harry Patterson Quote Link to comment Share on other sites More sharing options...
TK. Posted November 28, 2013 Report Share Posted November 28, 2013 Yes, this is possible with some clever .NGR scripting! :) -> http://www.ucapps.de/midibox_ng_manual_ngr.html There is a special "set_rgb" command which allows you to set any ring to any colour based on any condition. Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
wpatterson Posted December 3, 2013 Author Report Share Posted December 3, 2013 Is there away to use an encoder to "scroll through" the sections of a NGR Script? Thanks, Harry Patterson Quote Link to comment Share on other sites More sharing options...
Spirit Posted December 3, 2013 Report Share Posted December 3, 2013 (edited) yes i think you can use. EVENT_ENC ID=1 TYPE=META META=RUNSECTION RANGE=0:127 and the RANGE will be the first Section, everything in between, and last section. and if you dont like to have all the sections on the encoder you can use the RANGE=MAP1 and MAP1 1 2 4 8 16 wil only tigger Section 1 2 4 8 and 16.... dont have my hardware at my side so cant test it.. Edited December 3, 2013 by Spirit Quote Link to comment Share on other sites More sharing options...
wpatterson Posted December 9, 2013 Author Report Share Posted December 9, 2013 Thanks so much! I will give that a try. Thanks, Harry Patterson Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.