Kaimana RGB LED Board thread, RGB animations and more! SRK Tech Talk 2013 Product of the Year!

#1391

Yeah, pure blue becomes closer to cyan in the on or off state. Boot flash and idle animations will show a deep, saturated blue though.

I’ll see if I can get my sketch files uploaded when I get home, then you could take a peek at the code generated from Brightstick.

#1392

Actually, I just went and recreated my setup at Brightstick. These files should match what I’m using at home.

https://megaupload.nz/d6ba02rbb4/panzer2kaimana_zip

#1393

Did anyone have a chance to check out the code and see if anything stood out to them as affecting the color accuracy?

#1394

@Spellbot-5000

I’m sorry, I have not had a chance yet. I tried loading it on one of my work PCs and it wouldn’t recognize the COM port. My other PC recognizes it but because it’s a Linux machine I need to install Crossdev support for it, so once I do that I can test it. It’s been busy up here and we’re in the middle of a reorganization as well.

I’ll follow up as soon as I can.

#1395

Hi, i have a question in regards to the rainbow idle animation. Does anyone happen to know how to change the colors? for example, I’d like to remove yellow and green. Thanks for any help

#1396

@GanjaD Theres no simple way to do this, because the values for R,G and B are calculated using a bit of math along with an array of values in the animation_idle function in the animations.cpp. You could try and design the curves for the color you do want to cycle through.

Example if you want red and blue, you can just use a sine function on those two values and leave green on 0.

#1397

Where do i write my code at for the 8 button layout ? sorry im confused is it brightstick.freecade

#1398

You design your animations at brightstick if you want. It will produce a package with code files you need to load to the Kaimana via Arduino IDE. You can also directly write the code on these files and load them via the same method.

#1399

For anyone using brightstick you will need to edit the code after to remove the 8th LED = joystick problem. You can find it in kaimana.cpp use the // to comment out these lines as exampled below:

void Kaimana::setLED(int index, int iR, int iG, int iB)
{
  // set led identified by index to the RGB color passed to this function
 
  _led[index].r = iR*BRIGHTNESS;
  _led[index].g = iG*BRIGHTNESS;
  _led[index].b = iB*BRIGHTNESS;
  


// if(index == LED_JOY)
//  {
//    index = 8;
//   _led[index].r = iR*BRIGHTNESS;
//   _led[index].g = iG*BRIGHTNESS;
//   _led[index].b = iB*BRIGHTNESS;
//  }
//  else
//  {

     _led[index].r = iR*BRIGHTNESS;
     _led[index].g = iG*BRIGHTNESS;
     _led[index].b = iB*BRIGHTNESS;
     _led[index+ 1].r = iR*BRIGHTNESS;
     _led[index+ 1].g = iG*BRIGHTNESS;
     _led[index+ 1].b = iB*BRIGHTNESS;
//   }
   
}
1 Like
#1400

You can also do this:

void Kaimana::setLED(int index, int iR, int iG, int iB)
{
  // set led identified by index to the RGB color passed to this function
 
  _led[index].r = iR*BRIGHTNESS;
  _led[index].g = iG*BRIGHTNESS;
  _led[index].b = iB*BRIGHTNESS;
  


/* if(index == LED_JOY)
  {
    index = 8;
   _led[index].r = iR*BRIGHTNESS;
   _led[index].g = iG*BRIGHTNESS;
   _led[index].b = iB*BRIGHTNESS;
  }

  else
  {
*/     _led[index].r = iR*BRIGHTNESS;
     _led[index].g = iG*BRIGHTNESS;
     _led[index].b = iB*BRIGHTNESS;
     _led[index+ 1].r = iR*BRIGHTNESS;
     _led[index+ 1].g = iG*BRIGHTNESS;
     _led[index+ 1].b = iB*BRIGHTNESS;
//}
   
}

Or delete the code from the file altogether.

void Kaimana::setLED(int index, int iR, int iG, int iB)
{
  // set led identified by index to the RGB color passed to this function
 
     _led[index].r = iR*BRIGHTNESS;
     _led[index].g = iG*BRIGHTNESS;
     _led[index].b = iB*BRIGHTNESS;
     _led[index+ 1].r = iR*BRIGHTNESS;
     _led[index+ 1].g = iG*BRIGHTNESS;
     _led[index+ 1].b = iB*BRIGHTNESS;   
}
1 Like
#1401

@JRDIBBS that /* trick is cool!

#1402

@JRDIBBS

I tried both methods and it fixed the “joystick” glitch which caused 1 [one] out of 2 leds on my “Punch 3” button to quickly shut off leaving only “one led” on while depressing said button ( I’m using brightstick ) but now the same issue switched to my “start button”. Help please. I was overjoyed after dealing with this issue for over a year. Now this this… BTW, you guys are great at PAS!

#1403

Oh yeah, will brightstick ever be updated with this in mind?

#1404

Brightstick is not our tool or our code. Jasen coded it and uses the layout he does for whatever reason. He would have to be the one to update it.

Any chance you can make a video of the issue?

#1405

Yes I can however it’s the same issue but now it’s affecting a different button. After altering the code, the joystick glitch switched from the P3 button to START button. My chain is: JOYSTICK->START->P1 ending with-> K1. I’ll upload asap.

#1406

Brightstick is meant to be used for the PAnzer 2’s onboard lighting solution, this pcb is setup so that the joystick led can be skipped. I’ve been on the fence about creating a tool to create layouts but i need to clean up my manual code a bit more.

Can you try this code? Its from my repo and meant for layouts that have all the leds. you might just have to reorder the leds but it should work!
https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/javierorosario/kaimana/tree/master/Rework

#1407

@JRDIBBS okay I see. I’ll try it!

#1408

I’m not sure how to upload vids on here. I’m brand new

#1409

Oh yeah, I use the arduino 1.6.5 so that brightstick sketches can work. Should I update arduino? …So I have all colored translucent buttons and instead of the buttons idling in multi colors, how do I get them to idle in different shades or tones of white instead. I changed the “RANDOM COLORS SET” under “kaimana_custom.h” to all white but it still idles in multicolors.

#1410

@RJ369

You can still use Arduino 1.6.5 for Kaimana code. If you’re starting to dive into customizing the colors via Arduino it’s best to use the default Kaimana code from @JRDIBBS repo.

1 Like