aboutsummaryrefslogtreecommitdiff
path: root/docs/_book/Usage/Configuration.html
blob: ffc7c9f3a169556a80f416e2a40c327bc49d21ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Configuration · Luxcena-Neo wiki</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="JakobST1n">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-pretty-term/terminal.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-hints/plugin-hints.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-comment/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-emphasize/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-api/api.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="CLI.html" />
    
    
    <link rel="prev" href="Install.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="./">
            
                <a href="./">
            
                    
                    Usage
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="Install.html">
            
                <a href="Install.html">
            
                    
                    Install
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2.2" data-path="Configuration.html">
            
                <a href="Configuration.html">
            
                    
                    Configuration
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="CLI.html">
            
                <a href="CLI.html">
            
                    
                    CLI
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    Scripting
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../Scripting/SupportLib/">
            
                <a href="../Scripting/SupportLib/">
            
                    
                    Support Library
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    Contributing
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" >
            
                <span>
            
                    
                    Modules
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1.1" data-path="../Contributing/Modules/CompileAndRun.html">
            
                <a href="../Contributing/Modules/CompileAndRun.html">
            
                    
                    CompileAndRun
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >Configuration</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="configuration">Configuration</h1>
<p>How to setup luxcena-neo to work with your setup</p>
<hr>
<pre><code class="lang-bash">$ sudo lux-neo conf
</code></pre>
<p>When running the command above, a config file should appear in the editor &apos;nano&apos;.</p>
<pre><code class="lang-json">{
    <span class="hljs-string">&quot;led_count&quot;</span>: <span class="hljs-number">53</span>,
    <span class="hljs-string">&quot;segments&quot;</span>: [],
    <span class="hljs-string">&quot;matrix&quot;</span>: [],
    <span class="hljs-string">&quot;segmentConfiguration&quot;</span>: <span class="hljs-string">&quot;snake&quot;</span>,
    <span class="hljs-string">&quot;led_pin&quot;</span>: <span class="hljs-number">18</span>,
    <span class="hljs-string">&quot;led_freq_hz&quot;</span>: <span class="hljs-number">800000</span>,
    <span class="hljs-string">&quot;led_dma&quot;</span>: <span class="hljs-number">10</span>,
    <span class="hljs-string">&quot;led_invert&quot;</span>: <span class="hljs-literal">false</span>,
    <span class="hljs-string">&quot;led_channel&quot;</span>: <span class="hljs-number">0</span>
}
</code></pre>
<p><div class="alert alert-success hints-alert"><div class="hints-icon"><i class="fa fa-mortar-board"></i></div><div class="hints-container"><p>If you rather want to use vim or another editor, the file is at <code>/home/lux-neo/userdata/config/strip.json</code></p>
</div></div></p>
<h2 id="ledcount">led_count</h2>
<p>This is the number of LED&apos;s you want to control.</p>
<h2 id="segments">segments</h2>
<p>This is a simple list, here you should add the lenghts of all your segments. Please enter the &quot;real&quot; length, and don&apos;t start counting from 0. If you just want one segment, you should just have one element in the list, which is the number of led&apos;s you are controlling.</p>
<p>When summing this list, it should check out with the &quot;led-count&quot;-option.</p>
<h2 id="matrix">matrix</h2>
<p>This is a two dimensonal array, used to arrange the segments in a matrix of your likings. Here you enter the segment-number to represent them. In the example above, all the segments are in one line. If you want to have them in a square, it could look like this:</p>
<pre><code class="lang-json"><span class="hljs-string">&quot;segments&quot;</span>: [<span class="hljs-number">10</span>, <span class="hljs-number">10</span>, <span class="hljs-number">10</span>, <span class="hljs-number">10</span>, <span class="hljs-number">10</span>, <span class="hljs-number">10</span>, <span class="hljs-number">10</span>, <span class="hljs-number">10</span>, <span class="hljs-number">10</span>],
<span class="hljs-string">&quot;matrix&quot;</span>: [
    [[<span class="hljs-number">0</span>, <span class="hljs-literal">false</span>], [<span class="hljs-number">1</span>, <span class="hljs-literal">true</span>], [<span class="hljs-number">2</span>, <span class="hljs-literal">false</span>]],
    [[<span class="hljs-number">3</span>, <span class="hljs-literal">true</span>], [<span class="hljs-number">4</span>, <span class="hljs-literal">false</span>], [<span class="hljs-number">5</span>, <span class="hljs-literal">true</span>]],
    [[<span class="hljs-number">6</span>, <span class="hljs-literal">false</span>], [<span class="hljs-number">7</span>, <span class="hljs-literal">true</span>], [<span class="hljs-number">8</span>, <span class="hljs-literal">false</span>]]
]
</code></pre>
<p>Each entry looks is a list, with two parameters, <code>[&lt;segment_number&gt;, &lt;invert&gt;]</code>
<div class="alert alert-danger hints-alert"><div class="hints-icon"><i class="fa fa-exclamation-circle"></i></div><div class="hints-container"><p>If you don&apos;t have a reference to all the segments or something, the matrix setup will fail. And fall back to &apos;segmentsconfiguration&apos;</p>
</div></div></p>
<h2 id="segmentconfiguration">segmentconfiguration</h2>
<p>If the matrix-option is empty or badly setup. The matrix will be set up using one of these defaults:</p>
<pre><code>&quot;snake&quot;:
&quot;line&quot;:
&quot;random&quot;:
</code></pre><h2 id="ledpin">led_pin</h2>
<p>If using the luxcena-shield, you shouldn&apos;t have to worry about this option. But set it to the GPIO-port connected to your pixel&apos;s din-port.</p>
<h2 id="leddma">led_dma</h2>
<p><div class="alert alert-danger hints-alert"><div class="hints-icon"><i class="fa fa-exclamation-circle"></i></div><div class="hints-container"><p>If using a newer RPi (3 or newer), leave this as 10! Or your file-system might crash.</p>
</div></div>
This is the dma-channel used to generate the data-stream. If you for some reason need channel 10 for something else, you can change it. But i strongly recommend leaving it to 10!</p>
<h2 id="ledinvert">led_invert</h2>
<p>This should not be touched, unless you are using a inverting level converter.</p>
<h2 id="ledchannel">led_channel</h2>
<p>Leave this as default unless you know what you are doing.</p>
<hr>
<p>Now you might want to take a look at the <a href="CLI.html">command line interface</a>.</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="Install.html" class="navigation navigation-prev " aria-label="Previous page: Install">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="CLI.html" class="navigation navigation-next " aria-label="Next page: CLI">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Configuration","level":"1.2.2","depth":2,"next":{"title":"CLI","level":"1.2.3","depth":2,"path":"Usage/CLI.md","ref":"Usage/CLI.md","articles":[]},"previous":{"title":"Install","level":"1.2.1","depth":2,"path":"Usage/Install.md","ref":"Usage/Install.md","articles":[]},"dir":"ltr"},"config":{"plugins":["code","pretty-term","hints","comment","github","emphasize","api","offline","livereload"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"emphasize":{},"offline":{},"pretty-term":{},"github":{"url":"https://github.com/jakobst1n/luxcena-neo"},"livereload":{},"search":{},"hints":{"danger":"fa fa-exclamation-circle","info":"fa fa-info-circle","tip":"fa fa-mortar-board","working":"fa fa-wrench"},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"code":{"copyButtons":true},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"api":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"comment":{"highlightCommented":true}},"theme":"default","author":"JakobST1n","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Luxcena-Neo wiki","gitbook":"*"},"file":{"path":"Usage/Configuration.md","mtime":"2018-11-30T10:47:07.758Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-30T22:53:52.196Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-pretty-term/terminal.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-comment/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-github/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-api/api.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-offline/service-worker-registration.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>