Strobe


i looking create program flash 16 outputs @ individually variable rates. rates set dmx via shield can set serial now. using tlc5940 control these outputs, understand coding , serial. assume timer , interrupt based? need example 2 outputs individual rate control if willing help

i have code working, blinks not strobes. need 10-20 ms pulses, not blinking
code: [select]

#include <tlc5940.h>
#include <tlc_animations.h>
#include <tlc_config.h>
#include <tlc_fades.h>
#include <tlc_progmem_utils.h>
#include <tlc_servos.h>
#include <tlc_shifts.h>

/* blink multiple leds without delay
*
* turns on , off several light emitting diode(led) connected digital
* pin, without using delay() function.  means other code
* can run @ same time without being interrupted led code.
*/
const int numleds = 8;
byte pin[numleds] = {40,41,42,43,44,45,46,47};
long state[numleds] = {0,0,0,0,0,0,0,0};
unsigned long interval[numleds] = {100, 200, 300, 400, 500, 600, 700, 800};
unsigned long time[numleds];

void setup()
{
tlc.init();
}

void loop()
{
unsigned long m = millis();

(int i=0; i<numleds; ++i)

      if (m - time[i] > interval[i])
   {
     time[i] = m;
     state[i] = state[i] == 0 ? 4095 : 0;
     tlc.set(pin[i], state[i]);
     tlc.update();
   }
   
}




Arduino Forum > Using Arduino > LEDs and Multiplexing > Strobe


arduino

Comments

Popular posts from this blog

Thread: PKI Client 5.00 install (for eToken Pro)

ATmega2560-Arduino Pin Mapping

Crossfader Arduino Tutorial