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


#1161

That is simple to program, hes only pressing one button. The system gets complicated when you try to detect multiple sequential button presses and then do an action on it.


#1162

It worked, thanks again @JRDIBBS


#1163

@JRDIBBS He’s pressing two buttons. I’d be happy with getting animations from that. Can you give me advice on how to program two buttons to do an animation?


#1164

yes I did, thanks, right now I’m going try to work on animations but when I have time off.


#1165

I can’t seem to be able to flash any new sketches anymore to my Kaimana Mini.
The board still lights up my LEDs, but I cannot change the colors or order of my lights due to not being able to upload a new sketch.
My log from Arduino 1.8.2 (Note: This also happened with older versions of the IDE):
https://pastebin.com/KzwrmPfW


#1166

Hey everyone, I’m having a bit of a problem with this script code stuff as i am a bit new to this.
Seems like the brightstick.freecade.org site is no longer working so i can’t get my joystick to light up properly.
Can anyone send me a solid Arduino Code with the common animations and all colours for my Hoku joystick and 8 buttons.
On the script the colours could be set to any colours. I’m pretty sure i know how to change the colours myself.
I just need a solid code for the Kaimana mini.
Can anyone help me out here?

Maybe @JRDIBBS @D4B5 @armi0024 ?

Thanks guys.


#1167

this is the download you want:

8btns with joystick and menu


#1168

Thanks @JRDIBBS for getting back to me and for the code.

I’m pretty sure I’m uploading it properly onto arduino. It keeps giving me the same error message every time and i have no idea what to write to fix it.
The “return(false);” line is highlighted red.its in the “animations.cpp”

//light walks thru all 8 buttons
void walkyStartup(int iR,int iG, int iB)
{
for (int i = 0; i < LED_COUNT; i++)
{
if ((i==0) || ((i % 2) == 0))
{turnOn(i, iR,iG,iB);}
}
}

void walkyIdle(int iR,int iG, int iB)
{
for (int i = 0; i < LED_COUNT; i++)
{
if ((i==0) || ((i % 2) == 0))
{blink(i, iR,iG,iB);

  for(int j=0;j&lt;SWITCH_COUNT;j++)
  {
    if( !digitalRead(switchPins[j]) )
    return(false);                                        

The error message says:

animations.cpp: In function ‘void walkyIdle(int, int, int)’:
animations.cpp:228: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
return(false);
^
return-statement with a value, in function returning ‘void’ [-fpermissive]

I have no idea what this means. I tried to switch “false” to “true” and got the same msg.

Any idea what i should write there?
Im using a Macbook pro

I also wanted to control the brightness if i could on the custom h page … dosent seem to have those options there. the lights are to bright sometimes.


#1169

Ugh sorry about that I will have a fix this afternoon. I swear I fix one thing 2 more things break. I think I fixed it locally but did not upload the new version.

Let me confirm the version I put up will have the changes and I’ll tell you how you can change the brightness.


#1170

Thanks a lot @JRDIBBS for your help.

I could imagine how tough this code stuff could be sometimes. When i look at it all i see is the matrix lol


#1171

So i looked at the code and it seems the version online is up to date, which arduino IDE version are you using? I have 1.6.11, if you have a version lower than that try updating it and upload again.


#1172

Thanks @JRDIBBS it worked.

I was using version 1.6.5 and 1.6.11 worked.

Is there anyway you can tell me how to control the brightness?

I’m pretty sure once I know how to do that i will have no more questions.

Thanks again man for taking the time to help me out.


#1173

i recently got a kaimana Leonardo and im trying to change the colors and what not but it gives me this error;

Archiving built core (caching) in: C:\Users\Emo_2\AppData\Local\Temp\arduino_cache_602617\core\core_arduino_avr_leonardo_0c812875ac70eb4a9b385d8fb077f54c.a

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
Copyright © 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright © 2007-2014 Joerg Wunsch

     System wide configuration file is "C:\Program Files (x86)\Arduino\hardware	ools\avr/etc/avrdude.conf"

     Using Port                    : COM5
     Using Programmer              : avr109
     Overriding Baud Rate          : 57600

avrdude: ser_open(): can’t set com-state for “\.\COM5”

avrdude done. Thank you.

An error occurred while uploading the sketch


#1174

Going Public
Moledcule Firmware now open to the public
check out the GitHub repo

Redux
Kaimana Redux is open public now too
check out the GitHub repo


#1175

Hello Everyone!

I have come back from the cave and bring great news! The latest commit to my code includes a brand new settings file!

What’s this now?
I have extracted the most common settings and put them in a single, very visible file called settings.h.

How do I use it?
Take a look at the file, the most common options users are looking for are defined here!. Each options has an explanation on how to use it.

Some of the settings include:
[list]
[] Brightness level ( @Dandyman this is what you were asking for)
[
] Idle Color
[*] Color on press
[/list]

DOWNLOAD ME HERE

TODO:
Figure out how to decouple the interrupt mechanism so that i can define any number of LEDs.

Take a look at this link and do the steps there, we’ve found an issue and are actively researching solutions, this is a temporary one. Please try it and give us feedback if it worked for you.

I will personally ask that you do that first time and see if it works, if it does do another code upload without the solution and report back if it worked.


#1176

Hi everyone,

I’m new here, and from France.
Recently i tried kaimana mini board. I have some issues. All my six LEDs are functional but when i press a pushbutton (for exemple P1) an other led is turning on (for exemple P2).

I tried to change leds order :
Kaimana board > LED P1 > LED K1 > LED K2 > LED K3 > LED P3 > LED P2 > LED JOY > LED START

I really need some help and an explanation for arduino code.

I’d like to use the code “pollSwitches” for each buttons (with a fade effect)

Who can help me?

Thanks a lot for a french noob :slight_smile:


#1177

The easiest way to change the led is to rearrange the physical order of the LEDs. I have a guide here but its old and outdated.

For the fade effect, there’s a way im researching on how to do it but it boils down to increasing the intensity of the led while its being held down and then decreasing it when you let go:


  // test switch and set LED based on result
  if(!digitalRead(PIN_P1))
  {
    switchActivity |= ATTACK_P1;
    // switch is active
    if(iLED[LED_P1] == true)
    {
		intensity ++;
		//maintain color while switch is active
		iLED[LED_P1] = true;
		pressIntense(LED_P1, intensity,_ON_PRESS_BTN_COLOR);
    }
    else
    {
      // select new color when switch is first activated
	  //setLEDRandomColor(LED_P1);
      iLED[LED_P1] = true;
    }
  }
  else
  {
      // switch is inactive
      kaimana.setLED(LED_P1, BLACK);
	  if(intensity > 0)
	  {
		  intensity--;
		  pressIntense(LED_P1, intensity,_ON_PRESS_BTN_COLOR);
	  }
	  iLED[LED_P1] = false;
  }


I’m taking a bit of time to answer because of time constraints on my end but let me know any questions you have.


#1178

you are awesome. I’ll test it this evening.


#1179

Hi Everyone,
just got the Kaimana Mini from Paradise, been trying to read this forum for information on how to set it up. I’ve been trying to use @JRDIBBS Kaimana Guide on his website: http://www.mightyjrmods.com/kaimana-guide

I get to the part about Renaming the Example file, to re upload the startup animations on Arduino Version 1.8.4 I get the following Error:
\Documents\Arduino\libraries\Kaimana/kaimana_custom.h:138:7: error: ‘prog_uint8_t’ does not name a type

const prog_uint8_t sinusoid[257] PROGMEM = {
^
Arduino\libraries\Kaimana/kaimana_custom.h:162:7: error: ‘prog_uint8_t’ does not name a type

const prog_uint8_t colorCycleData[] PROGMEM = {
^
exit status 1
Error compiling for board Arduino/Genuino Uno.

The Kaimana works, all the wires are connected, I have only 4P and 4K buttons I am trying to use, however it just loops into the “Standby” mode.

I’ve been going through this post looking for info, however a lot of the information or links are broken, The brightstick.freecade.org site I was planning to use is no longer online.

If anyone can help me out with how I should go about this. I really just want the buttons to be one color when not active, and then red when pressed, with maybe some animation or effects on them, but I’m pretty much stuck at square one.

I sent you a PM JRDIBBS just in case you may have some info.

Thanks for all the great posts on this board, it is what convinced me to get the Kaimana in the first place.


#1180

Can you change the intensity of the led? If not, how intense is the light, does that depends on the color?