Go Down

Topic: Attiny85 and Tlc5940 (Read 625 times) previous topic - next topic

battleshy

  I had a little trouble finding this when I first tried using the Attiny85 with the Tlc.5940 thought I would share the link here, I have an Attiny85 with the arduino bootloader and a random blink sketch, controlling 2 tlc5940 with the help of this library.

  Hope this helps others,
http://www.artlum.com/arduino/tinytlc.html

Derek

battleshy

Attiny85 & 2 Tlc5940 blink code.


Code: [Select]
#include <Arduino.h>
#include "Tiny85_TLC5940.h"
long randNumber;
void updateLEDs()
{
}
void setup()
{
  randomSeed(analogRead(0));
  // Remove these lines only if you know what you're doing,
  // I'm not assuming any responsibility....
  TCCR0A = TCCR0B = 0;
  TCCR1 = 0;

void loop()
{
  tlc5940.init();
  randNumber = random(32);
  for (int ks=0;ks<5;ks++)
  {
    tlc5940.set(randNumber, 4095);
    tlc5940.update();
  }
  updateLEDs();
}


Derek

Alexdm0

Hi,

I dont suppose you could host the library somewhere else? The link seems to be broken...

Cheers!

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy