COLORDUINO, PROGRAM HELP

hi there, I bought a coloring shield with an RGB led matrix 8x8.

and I just don't get how to program it, I want to start with something easy like making it display just one color.

thanks in advanced

Have you tried the search function, top right of the page? It yielded 403 results for me for the term 'colorduino'. You can, of course, narrow down your search by adding additional words.

i tryed but even though so. i just cant get what i have to do. i looked at a lot of codes and i dont get anything.

also, here is my email. contact me using email. its a lot better and private. basically because i know you can help me since i see you are a edison member. i got a million problems usually, kind of a miracle that i dont have an error when writing in code.thanks. if you answer me, use my email.

email: victorraduca123@gmail.com

hi there. I would like to know how to make a Colorduino light up all the LEDs in one color.
please do NOT ASK IF I HAVE SEARCHED, BECAUSE I SEARCHED EVERYWHEER.
links:

http://www.seeedstudio.com/depot/8x8-RGB-LED-Dot-Matrix-Compatible-with-Rainbowduino-p-113.html

I won't ask if you've searched, then.

Instead, I'll ask what code you have now, and how that makes the Colorduino behave.

You should also tell us how you have it wired - the link you gave was to a page that offered a bare matrix, not a colorduino, which is the name for the controller board. Are you using the colorduino controller board? Or are you using the bare matrix?

Hi,
Did you look at the site you bought it from?
http://store.iteadstudio.com/index.php?main_page=product_info&cPath=18&products_id=312

This is the shield, they have at the bottom of the page INFORMATION including DEMO code.

What is your electronics, programming, arduino, hardware experience?

Tom..... :slight_smile:

tom... thats the page i buyed the color shield from. I looked at the code. and for starters, it doesn't work. secondly, its way too complex. can anyone just tell how to make only one led shine in a certain color. or tell me how to make all of the board shine in a certain colour. please. im desperate. no kidding. seriously.

I don't have the hardware and I'm unlikely to acquire one, but if you post your code, I may be able to help.

LISTEN CAREFULLY. I DON'T HAVE A CODE. I NEED A CODE. DO YOU EVEN READ WHAT I SAY

Likewise - I don't have the hardware, can't help you.

We can point out problems in code if you post it, but we can't do anything beyond that. Start with the sample code, which you claim doesn't work, and post it and say what it does wrong.

We help - we don't write your code for you here.

If you want someone to write code for you, sure, I'll write code - mail me the hardware, and pay me for my time. I think that's how a lot of people here feel. It's your project, not ours - we're just helping for the fun of it and because we like talking about electronics. When you start demanding we write your code for you, that's not fun, that's work. I only do work for other people if I'm paid to do it or am required to by law.

victorraduca:
I looked at the code.

So, despite the SHOUTING, you do have code. You even said

it doesn't work

so you must have tried it.

So, post that code here.

Or just carry on bleating and whining.
Your choice.

I'll give you a code that works. not the one that doesn't work.

	/*
  ColorduinoPlasma - Plasma demo using Colorduino Library for Arduino
  Copyright (c) 2011 Sam C. Lin lincomatic@hotmail.com ALL RIGHTS RESERVED
  based on  Color cycling plasma   
    Version 0.1 - 8 July 2009
    Copyright (c) 2009 Ben Combee.  All right reserved.
    Copyright (c) 2009 Ken Corey.  All right reserved.
    Copyright (c) 2008 Windell H. Oskay.  All right reserved.
    Copyright (c) 2011 Sam C. Lin All Rights Reserved
  This demo is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.
  This demo is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.
  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

#include <Colorduino.h>

typedef struct
{
  unsigned char r;
  unsigned char g;
  unsigned char b;
} ColorRGB;

//a color with 3 components: h, s and v
typedef struct 
{
  unsigned char h;
  unsigned char s;
  unsigned char v;
} ColorHSV;

unsigned char plasma[ColorduinoScreenWidth][ColorduinoScreenHeight];
long paletteShift;


//Converts an HSV color to RGB color
void HSVtoRGB(void *vRGB, void *vHSV) 
{
  float r, g, b, h, s, v; //this function works with floats between 0 and 1
  float f, p, q, t;
  int i;
  ColorRGB *colorRGB=(ColorRGB *)vRGB;
  ColorHSV *colorHSV=(ColorHSV *)vHSV;

  h = (float)(colorHSV->h / 256.0);
  s = (float)(colorHSV->s / 256.0);
  v = (float)(colorHSV->v / 256.0);

  //if saturation is 0, the color is a shade of grey
  if(s == 0.0) {
    b = v;
    g = b;
    r = g;
  }
  //if saturation > 0, more complex calculations are needed
  else
  {
    h *= 6.0; //to bring hue to a number between 0 and 6, better for the calculations
    i = (int)(floor(h)); //e.g. 2.7 becomes 2 and 3.01 becomes 3 or 4.9999 becomes 4
    f = h - i;//the fractional part of h

    p = (float)(v * (1.0 - s));
    q = (float)(v * (1.0 - (s * f)));
    t = (float)(v * (1.0 - (s * (1.0 - f))));

    switch(i)
    {
      case 0: r=v; g=t; b=p; break;
      case 1: r=q; g=v; b=p; break;
      case 2: r=p; g=v; b=t; break;
      case 3: r=p; g=q; b=v; break;
      case 4: r=t; g=p; b=v; break;
      case 5: r=v; g=p; b=q; break;
      default: r = g = b = 0; break;
    }
  }
  colorRGB->r = (int)(r * 255.0);
  colorRGB->g = (int)(g * 255.0);
  colorRGB->b = (int)(b * 255.0);
}

float
dist(float a, float b, float c, float d) 
{
  return sqrt((c-a)*(c-a)+(d-b)*(d-b));
}


void
plasma_morph()
{
  unsigned char x,y;
  float value;
  ColorRGB colorRGB;
  ColorHSV colorHSV;

  for(y = 0; y < ColorduinoScreenHeight; y++)
    for(x = 0; x < ColorduinoScreenWidth; x++) {
      {
	value = sin(dist(x + paletteShift, y, 128.0, 128.0) / 8.0)
	  + sin(dist(x, y, 64.0, 64.0) / 8.0)
	  + sin(dist(x, y + paletteShift / 7, 192.0, 64) / 7.0)
	  + sin(dist(x, y, 192.0, 100.0) / 8.0);
	colorHSV.h=(unsigned char)((value) * 128)&0xff;
	colorHSV.s=255; 
	colorHSV.v=255;
	HSVtoRGB(&colorRGB, &colorHSV);
	
	Colorduino.SetPixel(x, y, colorRGB.r, colorRGB.g, colorRGB.b);
      }
  }
  paletteShift++;

  Colorduino.FlipPage(); // swap screen buffers to show it
}

/********************************************************
Name: ColorFill
Function: Fill the frame with a color
Parameter:R: the value of RED.   Range:RED 0~255
          G: the value of GREEN. Range:RED 0~255
          B: the value of BLUE.  Range:RED 0~255
********************************************************/
void ColorFill(unsigned char R,unsigned char G,unsigned char B)
{
  PixelRGB *p = Colorduino.GetPixel(0,0);
  for (unsigned char y=0;y<ColorduinoScreenWidth;y++) {
    for(unsigned char x=0;x<ColorduinoScreenHeight;x++) {
      p->r = R;
      p->g = G;
      p->b = B;
      p++;
    }
  }
  
  Colorduino.FlipPage();
}

void setup()
{
  Colorduino.Init(); // initialize the board
  
  // compensate for relative intensity differences in R/G/B brightness
  // array of 6-bit base values for RGB (0~63)
  // whiteBalVal[0]=red
  // whiteBalVal[1]=green
  // whiteBalVal[2]=blue
  unsigned char whiteBalVal[3] = {36,63,63}; // for LEDSEE 6x6cm round matrix
  Colorduino.SetWhiteBal(whiteBalVal);
  
  
  // start with morphing plasma, but allow going to color cycling if desired.
  paletteShift=128000;
  unsigned char bcolor;

  //generate the plasma once
  for(unsigned char y = 0; y < ColorduinoScreenHeight; y++)
    for(unsigned char x = 0; x < ColorduinoScreenWidth; x++)
    {
      //the plasma buffer is a sum of sines
      bcolor = (unsigned char)
      (
            128.0 + (128.0 * sin(x*8.0 / 16.0))
          + 128.0 + (128.0 * sin(y*8.0 / 16.0))
      ) / 2;
      plasma[x][y] = bcolor;
    }
    
 // to adjust white balance you can uncomment this line
 // and comment out the plasma_morph() in loop()
 // and then experiment with whiteBalVal above
 // ColorFill(255,255,255);
}

void loop()
{
  plasma_morph();
}

anyway. i don't get a bit about it. i do know c++ a bit. bt i don't know how to make what i need. thanks

#include <Colorduino.h>

typedef struct
{
  unsigned char r;
  unsigned char g;
  unsigned char b;
} ColorRGB;

void ColorFill(unsigned char R,unsigned char G,unsigned char B)
{
  PixelRGB *p = Colorduino.GetPixel(0,0);
  for (unsigned char y=0;y<ColorduinoScreenWidth;y++) {
    for(unsigned char x=0;x<ColorduinoScreenHeight;x++) {
      p->r = R;
      p->g = G;
      p->b = B;
      p++;
    }
  }
  Colorduino.FlipPage();
}

void setup()
{
  Colorduino.Init(); // initialize the board
  ColorFill(255,0,0); // fill with red
}

void loop()
{}

it does not work

OK, thanks for letting me know.

are you going to do anything about it ?

Me?
Like I said, I don't have the hardware, so I'm going to have to say "no".

How about you?

i do have the hardware. even though so. you couls givi it another try. right.