Code Monkey home page Code Monkey logo

adafruit_tlc5947's Introduction

Adafruit TLC5947 Build StatusDocumentation

This is a library for our Adafruit 24-channel PWM/LED driver

Tested and works great with the Adafruit TLC5947

These drivers uses SPI to communicate, 3 pins are required to
interface: Data, Clock and Latch. The boards are chainable

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, check license.txt for more information All text above must be included in any redistribution

To install, use the Arduino Library Manager and search for "Adafruit TLC5947" and install the library.

adafruit_tlc5947's People

Contributors

agrommek avatar alangitman avatar caternuson avatar driverblock avatar evaherrada avatar hoffmannjan avatar ladyada avatar positron96 avatar siddacious avatar tdicola avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adafruit_tlc5947's Issues

The example doesn't work for me, please help me.

Hellow my name is Ivo Stratev/NoHomey and i have the following problem:
I couldn't find direct non technical support so i decided to create new Isssue.
The only code I' ve changed is the ports define and number of chips (i have 8 chained):

define NUM_TLC5974 8

define data 8

define clock 9

define latch 10

define oe 11 // set to -1 to not use the enable pin (its optional)

and the Adafruit_TLC5947::setLED method because of my wiring (brg) instead of (rgb).

So once i upload the code nothing happens.
Please help me i need it to work for the next week wich is the deadline for my project.
You can contact me here or on [email protected]
Thank you for your time.
Best regards, Ivo Stratev

malloc'ed memory does not get freed

The constructor mallocs memory for PWM array, but the destructor (there is none) does not free it. If the object is not global, there is a huge (~50 bytes) leak every time it is destroyed.

It would actually be better to not use dynamic RAM at all, e.g. specify output count as a template parameter and bake the array at compile-time.

calloc

Tried to use this library running on a Feather HUZZAH (ESP8266) board to control a TLC5947, both recently purchased. Using Arduino IDE v. 1.6.5, the library gets a compilation error from the use of calloc in line 27 of Adafruit_TLC5947.cpp.

Adafruit TLC5947\Adafruit_TLC5947.cpp.o:(.text+0x0): undefined reference to `calloc'

I changed the line to use malloc and it compiles fine and seems to function. But this doesn't zero the memory the way calloc does, so it's probably not exactly a fix.

pwmbuffer = (uint16_t *)calloc(2, 24*n); //original, doesn't compile
pwmbuffer = (uint16_t *)malloc(2* 24*n); //new, compiles

Non-functional with ESP8266

  • Arduino board: ESP8266 12-E ESP library 2.5.2

  • Arduino IDE version (found in Arduino -> About Arduino menu): 1.8.10

  • List the steps to reproduce the problem below (if possible attach a sketch or
    copy the sketch code in too): LED's are erratic like a timing issue...

3 daisy chained Adafruit 5947's...

Constant NUM_TLC5974 is wrong

Picky bug, but nonetheless here we go!
In the example code the device name is wrong in the NUM_TLC5974 declaration and usages throughout.
It should of course be NUM_TLC5947

Also, I haven't been able to find any info in the code or the docs about when and for what you would use the OE input to the board - or not.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.