forked from 2splat/arduino-TLC59116
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.html
135 lines (119 loc) · 5.79 KB
/
README.html
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
<h3>Arduino Library for TI TLC59116 LED-driver (v0.2)</h3>
<p>This provides a high level interface:</p>
<ul>
<li>Makes it easier to get started.
<ul>
<li>Discovers the devices.</li>
<li>Provides useful defaults.</li>
</ul></li>
<li>Provides most features.</li>
<li>Provides operations at the feature level (like "turn on channel 4").
<ul>
<li>Manages the subfields and state of the device registers.</li>
<li>i.e.: only update the bits to turn channel 5 on, without stomping the other channels.</li>
<li>So you don't have to, which minimizes bugs.</li>
<li>Optimizes some communications with the device.</li>
</ul></li>
<li>Allows the friendlier "." notation, so you don't have to remember when to use "->".</li>
<li>Provides a low-level interface if you don't want the state managed.</li>
</ul>
<h3>Requirements</h3>
<ol>
<li>An Arduino that is I2C capable, and works with the Wire library.</li>
<li>Arduino IDE version 1.0.5, or 1.0.4. There is a bug that causes a problem in 1.0.6.</li>
<li>At least one TLC59116, wired up and hooked to the default I2C pins of your Arduino.
<ol>
<li>Something on the outputs, otherwise it's real boring.</li>
</ol></li>
</ol>
<p>I have not tested this with any Makefile setups. Please send me info on how that works for you.</p>
<h3>Installation</h3>
<ol>
<li>Download the <a href="https://github.com/2splat/arduino-TLC59116/raw/master/arduino_TLC59116.zip">library zip file</a>.</li>
<li>Add the library to the Arduino IDE
<ol>
<li>(cf. the <a href="http://arduino.cc/en/guide/libraries">official instructions</a>)</li>
<li>For Arduino IDE 1.0.5:
<ol>
<li><code>Sketch -> Import Library -> Add Library</code></li>
<li>Then select the downloaded <code>arduino_TLC59116.zip</code>.</li>
</ol></li>
<li>For earlier versions, follow the "Manual" section of <a href="http://www.arduino.cc/en/guide/libraries">http://www.arduino.cc/en/guide/libraries</a>.</li>
</ol></li>
</ol>
<h3>Getting Started</h3>
<ol>
<li>Wire things up. Someone should write a how-to!</li>
<li>Try the examples.
<ol>
<li>"examples/basic<em>usage</em>single" is the same code as show in the "Usage" section of <a href="https://2splat.github.io/arduino-TLC59116/classTLC59116.html">TLC59116 Class</a>
<ol>
<li>Open it.</li>
<li>Do the Upload thing.</li>
<li>Oooh. Blinky light.</li>
</ol></li>
<li>"examples/test_features" wants you to interact with the serial-console.
<ol>
<li>Type single-letter commands into the top box, and click send. Try "?".</li>
<li>It has a bunch of behaviors, useful for testing the TLC59116 and your wiring prowess.</li>
</ol></li>
<li>"examples/allfeatures" is the source of most of the examples in the documenation.
<ol>
<li>It compiles.</li>
<li>It probably is not useful to actually run.</li>
<li>But, you can copy & paste from it.</li>
</ol></li>
<li>"examples/tlc59116blink" is what I use to do quick tests of wired-up devices.
<ol>
<li>Read it's comments!</li>
</ol></li>
</ol></li>
<li>Browse the <a href="https://2splat.github.io/arduino-TLC59116/classTLC59116.html">TLC59116 Class</a> documentation page:
<ol>
<li>The "Protocol" section describes the order you have to do things.</li>
<li>Further down, the <a href="http://2splat.github.io/arduino-TLC59116/classTLC59116.html#pub-methods">Public Methods</a> section has groups of operations (like "Digital" and "PWM").
<ol>
<li>(you probably want to ignore that first list of methods)</li>
<li>There's usually a short description of each method. </li>
<li>For example-code, explanations, and more details, click on the method-name.</li>
</ol></li>
</ol></li>
</ol>
<h3>Documentation</h3>
<p>HTML documentation, with examples, and explanation:</p>
<ul>
<li>Online: <a href="https://2splat.github.io/arduino-TLC59116">https://2splat.github.io/arduino-TLC59116</a>
<ul>
<li>For the high-level/friendly, start at the <a href="https://2splat.github.io/arduino-TLC59116/classTLC59116.html">TLC59116 Class</a></li>
<li>NB: That is the current version's documentation. You can download other versions by going to the <a href="https://github.com/2splat/arduino-TLC59116">repository</a>, choosing the branch of interest, navigating to the <code>arduino_TLC59116_doc.zip</code>, and clicking on the "raw" button.</li>
</ul></li>
<li>Or, download a <a href="https://github.com/2splat/arduino-TLC59116/raw/master/arduino_TLC59116_doc.zip">zip</a> of the documentation from the repository.</li>
<li>Some known bugs are noted in the documentation (summary on <a href="https://2splat.github.io/arduino-TLC59116/bug.html">"Related Pages::Bugs"</a>).</li>
<li>Some things that aren't done are on the <a href="https://2splat.github.io/arduino-TLC59116/todo.html">"Related Pages::Todo"</a></li>
</ul>
<h3>Developing</h3>
<ol>
<li>Everything should be in the <a href="https://github.com/2splat/arduino-TLC59116">github repository</a>.</li>
<li>Clone it to mess around. Fork it to keep track of the messing around.</li>
<li>I'm happy to consider pull-requests, especially for bug-fixes, documentation issues, and missing functions.
<ol>
<li>Please maintain a high-level of documentation.</li>
</ol></li>
<li>Requirements for developing:
<ol>
<li>Source control is by git, with a repository on github.</li>
<li>Documentation is generated by doxygen: <code>doxygen Doxyfile</code></li>
<li>The .zip files are constructed by gnu-make.</li>
<li>Several other files are constructed by gnu-make (e.g. <code>README.html</code>)</li>
<li>The default <code>make</code> target constructs everything.
<ol>
<li>It tries to be tolerant of missing tools.</li>
<li>It touches up a few files to insert the git-branch as the version.</li>
</ol></li>
<li>Releasing to github is by rules in the makefile, signaled by a flag file ".master-is-release"</li>
</ol></li>
</ol>
<h3>Credits</h3>
<ol>
<li>I2C scan function adapted from Nick Gammon (written 20th April 2011), http://www.gammon.com.au/forum/?id=10896&reply=6#reply6. Thanks Nick!</li>
</ol>