Go Down

Topic: Simple Led Stripe Driver up to 72Ws (Read 695 times) previous topic - next topic

mjkzz

Non-addressable Led stripe driver for Arduino, it can handle up to 5m long stripe. Simple to use and it is ready to plug in an led stripe.

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=390552788772&ssPageName=STRK:MESE:IT

Sample code:

Code: [Select]

// 
//    This is a sound trigger for Arduino using simple Piezo
//    as sound sensor, it is quick and dirty, but highly sensitive
//    device that can detect a moderate finger snap in 3 ft
//
//    Copyright (c) 2013 Peter Y Lin (a.k.a MJKZZ)
//
//    Permission is hereby granted, free of charge, to any person
//    obtaining a copy of this software and associated documentation
//    files (the "Software"), to deal in the Software without
//    restriction, including without limitation the rights to use,
//    copy, modify, merge, publish, distribute, sublicense, and/or sell
//    copies of the Software, and to permit persons to whom the
//    Software is furnished to do so, subject to the following
//    conditions:
//
//    This permission notice shall be included in all copies or
//    substantial portions of the Software.
//
//    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
//    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
//    OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
//    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
//    HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
//    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
//    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
//    OTHER DEALINGS IN THE SOFTWARE.
//
#include <avr/io.h>
#include <avr/interrupt.h>

#define   PIN_R  9
#define   PIN_G  10
#define   PIN_B  11

unsigned char    g_ucR = 128;
unsigned char    g_ucG = 128;
unsigned char    g_ucB = 128;

void setup()
{
  Serial.begin(115200);

  pinMode(PIN_R, OUTPUT);
  pinMode(PIN_G, OUTPUT);
  pinMode(PIN_B, OUTPUT);
}

void loop()
{
  analogWrite(PIN_R, g_ucR++);
  analogWrite(PIN_G, g_ucG+=8);
  analogWrite(PIN_B, g_ucB+=16);
 
  delay(30);
}

Search for "mjkzz" on eBay :-)

Go Up