Marxon Posted March 21, 2015 Report Posted March 21, 2015 (edited) Hi all, I like to use a 40 segment led bargraph and connected it like a 8x5 matrix. To control it with one single CC, i use five events with different ranges. DOUT_MATRIX n=10 rows=8 sr_dout_sel1=26 sr_dout_r1=25 EVENT_LED_MATRIX hw_id=149 type=CC chn=1 cc=66 range=0:24 led_matrix_pattern=2 EVENT_LED_MATRIX hw_id=148 type=CC chn=1 cc=66 range=25:50 led_matrix_pattern=2 EVENT_LED_MATRIX hw_id=147 type=CC chn=1 cc=66 range=51:76 led_matrix_pattern=2 EVENT_LED_MATRIX hw_id=146 type=CC chn=1 cc=66 range=77:102 led_matrix_pattern=2 EVENT_LED_MATRIX hw_id=145 type=CC chn=1 cc=66 range=103:127 led_matrix_pattern=2 LED_MATRIX_PATTERN n=2 pos=0 pattern=0000000000000000 LED_MATRIX_PATTERN n=2 pos=1 pattern=1000000000000000 LED_MATRIX_PATTERN n=2 pos=2 pattern=1100000000000000 LED_MATRIX_PATTERN n=2 pos=3 pattern=1110000000000000 LED_MATRIX_PATTERN n=2 pos=4 pattern=1111000000000000 LED_MATRIX_PATTERN n=2 pos=5 pattern=1111100000000000 LED_MATRIX_PATTERN n=2 pos=6 pattern=1111110000000000 LED_MATRIX_PATTERN n=2 pos=7 pattern=1111111000000000 LED_MATRIX_PATTERN n=2 pos=M pattern=1111111100000000 LED_MATRIX_PATTERN n=2 pos=8 pattern=1111111110000000 LED_MATRIX_PATTERN n=2 pos=9 pattern=1111111111000000 LED_MATRIX_PATTERN n=2 pos=10 pattern=1111111111100000 LED_MATRIX_PATTERN n=2 pos=11 pattern=1111111111110000 LED_MATRIX_PATTERN n=2 pos=12 pattern=1111111111111000 LED_MATRIX_PATTERN n=2 pos=13 pattern=1111111111111100 LED_MATRIX_PATTERN n=2 pos=14 pattern=1111111111111110 LED_MATRIX_PATTERN n=2 pos=15 pattern=1111111111111111 I know it is not possible to spread 40 leds perfectly over a range from 0 to 127. But somehow the led distribution is very uneven. Here is a diagramm to show what happens. Does somebody know where the problem is or what i´m doing wrong? Thanks for your help! Best regards Marxon Edited March 21, 2015 by Marxon Quote
Marxon Posted March 21, 2015 Author Report Posted March 21, 2015 After i had recap the issue, I remembered having a similar problem in the past. The solution is that each dout_matrix has always 16 entries. Hence it does not make sense to use all of the 16 pattern positions in my 8x5 matrix. So i changed led pattern. LED_MATRIX_PATTERN n=1 pos=0 pattern=0000000000000000 LED_MATRIX_PATTERN n=1 pos=1 pattern=1000000000000000 LED_MATRIX_PATTERN n=1 pos=2 pattern=1000000000000000 LED_MATRIX_PATTERN n=1 pos=3 pattern=1100000000000000 LED_MATRIX_PATTERN n=1 pos=4 pattern=1100000000000000 LED_MATRIX_PATTERN n=1 pos=5 pattern=1110000000000000 LED_MATRIX_PATTERN n=1 pos=6 pattern=1110000000000000 LED_MATRIX_PATTERN n=1 pos=7 pattern=1111000000000000 LED_MATRIX_PATTERN n=1 pos=M pattern=1111000000000000 LED_MATRIX_PATTERN n=1 pos=8 pattern=1111100000000000 LED_MATRIX_PATTERN n=1 pos=9 pattern=1111100000000000 LED_MATRIX_PATTERN n=1 pos=10 pattern=1111110000000000 LED_MATRIX_PATTERN n=1 pos=11 pattern=1111110000000000 LED_MATRIX_PATTERN n=1 pos=12 pattern=1111111000000000 LED_MATRIX_PATTERN n=1 pos=13 pattern=1111111000000000 LED_MATRIX_PATTERN n=1 pos=14 pattern=1111111100000000 LED_MATRIX_PATTERN n=1 pos=15 pattern=1111111100000000 Now all leds are scaled linear over the hole controller range. But one problem remains: There are still "gaps" at the cc values 26, 52, 78 and 104. Any ideas? Quote
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.