12V LED strip drives by Rainbowduino

Rainbowduino isn’t only  used to drive the LED matrix but also can be used to drive other things like: LED strip or motor.

Now here’s a  demo using Rainbowduino to drive LED light strip for showing the numbers.

We used 7 strips to make up a number character. And connect the LED strip to Rainbowduino pins .Hook up the RGB pins of light strip to RGB pins of Rainbowduino respectively and the anode of light strip to the VCC of Rainbowduino.

Program the code bellows into Rainbowduino and you can see the number display form 0 to 9 .

 

#include "Rainbow.h"
unsigned char NumTab[10]=
{
  0x77,0x06,0x5b,0x1f,0x2e,0x3d,0x7d,0x17,0x7f,0x3f
};
void setup()
{
  _init();
  close_all_line
  open_all_line
}
void loop()
{
  int i;
  for(i=0;i<10;i++)
  {
    shift_24_bit(NumTab[i],0,0);
    delay(500);
  }
}
void _init(void)    // define the pin mode
{
  DDRD=0xff;
  DDRC=0xff;
  DDRB=0xff;
  PORTD=0;
  PORTB=0;
}
void shift_1_bit(unsigned char LS) 
{
  if(LS) shift_data_1;
  else  shift_data_0;
  clk_rising;
}
void shift_24_bit(int Red,int Green,int Blue)  
{
  unsigned char i;
  le_high;
  for (i=0;i<8;i++)
  {
    if ((Green<<i)&0x80)   shift_1_bit(1);
    else                 shift_1_bit(0);

  }
  for (i=0;i<8;i++)
  {
    if ((Red<<i)&0x80) shift_1_bit(1);
    else          shift_1_bit(0);
  }
  for (i=0;i<8;i++)
  {
    if ((Blue<<i)&0x80)  shift_1_bit(1);
    else             shift_1_bit(0);
  } 
  le_low;
}

More info about “3W RGB LED strip” http://www.seeedstudio.com/depot/3w-rgb-led-strip-common-anode-12v-p-351.html

About Author

10 thoughts on “12V LED strip drives by Rainbowduino

  1. Thank you for answering.

    I am sorry, I got angry because I spent many Days to get it work in my way…

    What I’ve been written was a little bit hard… sorry for that. Essentially there has to be some more Product-Support.

    So please let beginners be able to begin.

    Selling Hardware is one part of that whole thing,
    i hope you would expand Informationdelivery.

    Thank you, and sorry for my roughness.

    ChrisS

  2. – ChrisS

    You are right. We have too little work done on the supporting side and rash with new ideas and dive into the development. The result is giving people some puzzle to play with, and bar out people wants things done in an easy and convenient way.

    We are going to fix this situation. Thank you for your suggestions! Before we have some useful output, you could visit the forum for some reference: http://www.seeedstudio.com/forum/viewforum.php?f=11.

    Also, please don’t fee reluctant to mail us for help at info(#)seeedi.com

    Sorry for the inconvenience brought!

  3. Is it so hard to write 10 litle Examples if you had developed this hardware…? Would be very nice.

  4. mmh, Rainbowduino is such a cool piece of Hardware. But, it doesn’t be the meaning of Arduino. It’s a Openhardware-Plaform for beginners to make it simple to do things.

    Rainbowduino IS NOT SIMPLE.

    Documentation is very small, understanding is very hard, Blog-Code is buggy, uselesshardware without Matrix, no Information, no Examples to do other thing like blink Matrix with mtxcontrol.

    puh!

    Nobody knows something you could ask.
    Posted 10 times in Arduino.cc Forum… no answer… because it’s so simple to use Rainbowduino…

    Conclusion, nice thing for professional Developers, but absolutly useless if you don’t know to use this thing before you buy it or you want to use it without it-sudies.

    I personally think, great Hardware… badest support I’ve ever seen. No Code commenting, no examples, nothing but much “nothing”…

    But be sure, you could do nice things with rainbowduino… if you could… driving Motors, blink single leds, build your ambilight or cool propellerclocks…

    Crazy funny carnival things… but you have to write your Documentation by yourself…. reverseengeneer Hardware… lern how to everything…

    Nice great liltle Hardware… with so much posibilities… WITHOUT POSSIBILITIES WHEN YOU NEED INFORMATION ABOUT HOW THIS WORKS.

    Like in this code…
    Commenting is absolutly the first idiot thing you have to do if you post code to explain something.
    Then check if the code is buggy. If it is, correct it… and then expand Documentation… 16 Sheets of Informaion you could place on 2 Sheets… but no examples… no detailinformation, no information anybody could use,… but 16 Sheets… Great Job!

  5. got it, library should be copied to arduino libraries folder: succedeed uploading the file and making the led strips work with 12v…
    best,
    kk

  6. If I try to upload the code using Arduino IDE,
    I get this error:
    +++++++++++++++++++++++
    In function ‘void setup()’:
    error: ‘open_all_line’ was not declared in this scope In function ‘void shift_1_bit(unsigned char)’:
    +++++++++++++++++++++++
    I’ve copied the “Rainbow.h” file inside the sketch folder, but it looks like something is missing?

    And another question regarding the led strips:
    do they still work with 5v or require 12v to see something?

    Sorry if these are stupid questions,
    I’m trying to learn,
    thanks,
    kk

Comments are closed.

Calendar

July 2009
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031