forked from2splat/arduino-TLC59116
- Notifications
You must be signed in to change notification settings - Fork0
Arduino library for TCL59116 LED Driver (PWM, constant-current, I2C)
License
NotificationsYou must be signed in to change notification settings
jmkao/arduino-TLC59116
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This provides a high level interface:
- Makes it easier to get started.
- Discovers the devices.
- Provides useful defaults.
- Provides most features.
- Provides operations at the feature level (like "turn on channel 4").
- Manages the subfields and state of the device registers.
- i.e.: only update the bits to turn channel 5 on, without stomping the other channels.
- So you don't have to, which minimizes bugs.
- Optimizes some communications with the device.
- Allows the friendlier "." notation, so you don't have to remember when to use "->".
- Provides a low-level interface if you don't want the state managed.
- An Arduino that is I2C capable, and works with the Wire library.
- Arduino IDE version 1.0.5, or 1.0.4. There is a bug that causes a problem in 1.0.6.
- At least one TLC59116, wired up and hooked to the default I2C pins of your Arduino.
- Something on the outputs, otherwise it's real boring.
I have not tested this with any Makefile setups. Please send me info on how that works for you.
- Download thelibrary zip file.
- Add the library to the Arduino IDE
- (cf. theofficial instructions)
- For Arduino IDE 1.0.5:
Sketch -> Import Library -> Add Library
- Then select the downloaded
arduino_TLC59116.zip
.
- For earlier versions, follow the "Manual" section ofhttp://www.arduino.cc/en/guide/libraries.
- Wire things up. Someone should write a how-to!
- Try the examples.
- "examples/basic_usage_single" is the same code as show in the "Usage" section ofTLC59116 Class
- Open it.
- Do the Upload thing.
- Oooh. Blinky light.
- "examples/test_features" wants you to interact with the serial-console.
- Type single-letter commands into the top box, and click send. Try "?".
- It has a bunch of behaviors, useful for testing the TLC59116 and your wiring prowess.
- "examples/allfeatures" is the source of most of the examples in the documenation.
- It compiles.
- It probably is not useful to actually run.
- But, you can copy & paste from it.
- "examples/tlc59116blink" is what I use to do quick tests of wired-up devices.
- Read it's comments!
- "examples/basic_usage_single" is the same code as show in the "Usage" section ofTLC59116 Class
- Browse theTLC59116 Class documentation page:
- The "Protocol" section describes the order you have to do things.
- Further down, thePublic Methods section has groups of operations (like "Digital" and "PWM").
- (you probably want to ignore that first list of methods)
- There's usually a short description of each method.
- For example-code, explanations, and more details, click on the method-name.
HTML documentation, with examples, and explanation:
- Online:https://2splat.github.io/arduino-TLC59116
- For the high-level/friendly, start at theTLC59116 Class
- NB: That is the current version's documentation. You can download other versions by going to therepository, choosing the branch of interest, navigating to the
arduino_TLC59116_doc.zip
, and clicking on the "raw" button.
- Or, download azip of the documentation from the repository.
- Some known bugs are noted in the documentation (summary on"Related Pages::Bugs").
- Some things that aren't done are on the"Related Pages::Todo"
- Everything should be in thegithub repository.
- Clone it to mess around. Fork it to keep track of the messing around.
- I'm happy to consider pull-requests, especially for bug-fixes, documentation issues, and missing functions.
- Please maintain a high-level of documentation.
- Requirements for developing:
- Source control is by git, with a repository on github.
- Documentation is generated by doxygen:
doxygen Doxyfile
- The .zip files are constructed by gnu-make:
- Several other files are constructed by gnu-make (e.g.
README.html
) - My makefile is idiosyncratic. I need to fix that:
- supposedly "make" makes everything, silently.
- "make release" constructs everything and pushes to "github".
- It tries to be tolerant of missing tools.
- It touches up a few files to insert the git-branch as the version.
- Releasing to github is by rules in the makefile, signaled by a flag file ".master-is-release"
- make release
- I2C scan function adapted from Nick Gammon (written 20th April 2011),http://www.gammon.com.au/forum/?id=10896&reply=6#reply6. Thanks Nick!
- Bug fix to milliamps(), and updated for Arduino 1.8+, by Red Byer aka github mizraith. Thanks!
- library.properties and keywords.txt fixes by perl1234
- more library.properties fixes by jmkao
About
Arduino library for TCL59116 LED Driver (PWM, constant-current, I2C)
Resources
License
Stars
Watchers
Forks
Packages0
No packages published
Languages
- C++58.8%
- Python28.2%
- Makefile7.8%
- Perl5.2%