×

SparkFun will be closed May 25, 2015 for Memorial Day. Orders placed after 2pm on Friday the 22nd will ship out on Tuesday. Thanks!

dgarcia42

Member Since: August 6, 2010

Country: United States

  • This is why one of the things that I have in FastLED is fast pin access. If you know the pins at compile time, it lets you toggle them on or off in as little as 2 clock cycles.

    void setup() { FastPin<13>::setOutput(); } 
    void loop() { while(1) {
        FastPin<13>::hi();
        FastPin<13>::lo();
        FastPin<13>::hi();
        FastPin<13>::lo();
        FastPin<13>::hi();
        FastPin<13>::lo();
    }}
    

    The one problem with the direct port access mentioned above is that it will turn the other 7 pins on PORTB off. There are games you can play to work around that, and in some places, FastLED does do its pin toggles in a single clock cycle (and on many arm platforms, you have separate i/o registers for setting pins hi and lo, which allows you to just write the 1<<X bit to a hi/lo register to toggle a pin high/low without worrying about preserving the existing register values).

  • iPad adapters, however tend to push 2amps, which is great for projects like this - especially since the power draw that they quote is for all leds on full brightness, full white. If you scale back the brightness to about 50% and are using colors (in other words, much less light being shot out) you can drive quite a few leds off of it.

  • Is it possible to get these strips without the silicone tubing. If not how much of a pain would it be to remove myself?

  • Bit banging output sucks (drives me batty that so much sample code for leds uses it). Better to use the onboard spi hardware to do most of the work for you, and free up a lot of your cpu time! I have a library that works with this strip using the spi hardware on the arduino - http://fastspi.googlecode.com - set the chipset to CFastSPI_LED::SPI_WS2801 and the data rate to 1 (it defaults to 0 which is too fast for the 5v version of the chipsets. On 12v strips, though i’ve used a data rate of 0 with no problems).
    For example, on the 32 led strip, it takes me 0.25ms to write out a single frame using my spi library. For 30 frames/second, that’s 7.5ms spent issuing spi commands - leaving 992.5ms for other fun stuff to play with.

  • I have another shield that is currently using digital pins 2, 3, and 4 - how difficult would it be to make this shield use pins 5,6,7 and 8 instead of 2,3,4 and 5?

No public wish lists :(