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


Nah it’s ok. I just wanted to make sure everything was working correctly on my end.

I used the 8buttonNoJoyWithMenu in the J2 folder so ya, maybe the K1 fix didn’t get applied to that one. I would say just focus on the rework. I think that would benefit the most people right now, instead of having to fix my particular issue. If you want to explain to me why it does it, I could fix it myself, but it’s also not that big a deal right now.


Hey Guys,

So i’ve loaded up the 8buttonNoJoyWithMenu in the J2 folder to the Kaimana mini and everything works great. But then I try to write some simple code to test out functionality and it doesnt seem to work correctly. Instead of lighting up both LEDs on the K4 button, it lights up both LEDs on the P1 button.

I also tried individually lighting up LEDs using their numbers instead of their definitions and it also seems a bit weird. I have to type the following code to get the first LED on the start button to light up.


here is my kaimana_custom.h file I didnt touch anything else.

  //   KAIMANA->LED-Start->LED_Select->LED_Home->LED_P1->LED-P2->LED_P3->LED-P4->LED_K4->LED_K3 ->LED_K2->LED_K1

  #define  LED_K1      20
  #define  LED_K1_B    21
  #define  LED_K2      18
  #define  LED_K2_B    19
  #define  LED_K3      16
  #define  LED_K3_B    17
  #define  LED_K4      14
  #define  LED_K4_B    15
  #define  LED_P4      12
  #define  LED_P4_B    13
  #define  LED_P3      10
  #define  LED_P3_B    11
  #define  LED_P2      8
  #define  LED_P2_B    9
  #define  LED_P1      6
  #define  LED_P1_B    7  
  #define  LED_SELECT    2
  #define  LED_SELECT_B  3
  #define  LED_BACK    2
  #define  LED_BACK_B  3
  #define  LED_HOME     4
  #define  LED_HOME_B  5
  #define  LED_GUIDE    4
  #define  LED_GUIDE_B  5
  #define  LED_START   0
  #define  LED_START_B 1
  // total number of LEDs attached to Kaimana board
  #define  LED_COUNT   22

and here is my custom test code. Doing this turns both LEDs on P1 on.

#include "kaimana.h"
#include "kaimana_custom.h"

Kaimana kaimana;

void setup() {


void loop() {



Also, how do I get the LEDs to not pulse rapidly when I hold down a button.

This is the code I was testing.

#include "kaimana.h"
#include "kaimana_custom.h"

Kaimana kaimana;

void setup() {


void loop() {

  if (!digitalRead(PIN_P1)){

  else {kaimana.setALL(BLACK);}




I wanted to address everything in a single post, been out of touch for the last few days and im finally getting some time to go through the queue.

1- K1 is immediately disabling the tournament mode
The fix for this is to add a delay command to the tourneypollSwitches function, this is because in the original function all the button press checks take time but the tourneypollSwitches doesnt have any logic running so its a speed demon. Adding an artificial delay inside the detection function is in my experimental build and it works.

  // test switch and set LED based on result       // HOME = GUIDE
	  //Button hold to change idle animation
		holdTimeout += 1;
		//Button hold to start tourneymode		
		if(holdTimeout == 200)
		tournamentMode = false;

2- Button order doesnt light up in the right order.
This one is tricky but to start troubleshooting it I will ask you check a few things,
- Is the physical wiring order the same as the order in your custom file? This is usually the main culprit when dealing with ordering issues. Again the LED numbers start by the one that’s connected first to the Kaimana and moves up from there in pairs.
- Check the setleds function, you will see that i automatically tell the function to light up both buttons by adding an [index+1]. Thats why calling the led by number isnt straight forward, to call the first one you should do setLED(0, BLUE);

3- The pulse is a tricky thing, try adding another delay the microprocessor is FAST.



@JRDIBBS thanks for the help. Luckily, I managed to fix the Tourney mode as well as figure out how to properly index the LEDs before you replied. I haven’t tested adding a delay for the pulsing but, wouldn’t that just make the pulsing slower?

I managed to break one of the connectors on one of my J2s so I’ll have to wait till another one arrives to test the code again. I’ll keep you updated and let you know how it goes though.

Thanks again for the help!


Hello. I need some help guys. I’m using a UFB and a Kaimana Kameleon. I’ve also got a LED joystick connected to a Kaimana adapter and I’ve got 10 J2’s on 8 main buttons and on START and Select.

  1. I need a wiring diagram for connecting a Kaimana adapter to a J2. The jacks are not the same.
  2. Is there a preferred order of connecting the lights. Right now I’m my plan is to connect the joystick to the Kameleon and then connect the rest of the buttons.

Thanks for any guidance.


How do I add buttons, I’m trying to get R3 led worked
Also as of now when I press the R1 button both the R1 and R3 buttons light up
When I press r3 nothing lights up
I’ve verified that I have my wiring correct and identified the proper leds in the custom file, I’m wondering if its maybe because i don’t have r3 added yet

Current setup is ps4+ board with the kaimana mini
I have the r3 wired to the actual pin using a terminal instead of using the wire harness that can you purchase to wire up l3 r3 and touch


Hey Bird333, i don’t have a kameleon so I’ma apologize if I’m misunderstanding anything, but assuming you have the adapter in this video, according to the video at around 3:50, you should just be able to connect the 4 pin connector into the adapter.

As for the order, it’s a personal preference. Just make sure the kaimana.h file is mapped correctly to your buttons. Again, I’m not sure how you would program the kameleon, as I remember reading something in the posts saying it was slightly different than just programming a kaimana mini, but if it’s similar than it should work.

Let me know if you need more help


I found this in a previous post. I think this is how you would do it or at least a step in the right direction. Notice how there are LEDs defined for L3/R3/TPAD. Also, make sure that the LED_COUNT at the bottom is is adjusted to your setup.

#define LED_P4 12
#define LED_P4_B 13
#define LED_P3 10
#define LED_P3_B 11
#define LED_P2 8
#define LED_P2_B 9
#define LED_P1 6
#define LED_P1_B 7
#define LED_JOY 0xFF
#define LED_K4 14
#define LED_K4_B 15
#define LED_K3 16
#define LED_K3_B 17
#define LED_K2 18
#define LED_K2_B 19
#define LED_K1 20
#define LED_K1_B 21
#define LED_SELECT 4
#define LED_SELECT_B 5
#define LED_HOME 2
#define LED_HOME_B 3
#define LED_START 0
#define LED_START_B 1
#define LED_L3 26 //L3 J2
#define LED_L3_B 27
#define LED_TPAD 24 //TPAD J2
#define LED_TPAD_B 25
#define LED_R3 22 //R3 J2
#define LED_R3_B 23
#define LED_COUNT 28


Thanks Imma try that and see what happens.


Didn’t work



Actually, now that I think about it, I don’t think the Kaimana actually supports the R3/L3/Tpad. There aren’t dedicated pins on the board for them if I’m correct.

Sorry for leading you on a wild goose chase


Which pin is for share on the kaimanamini, my idea is to jump the share pin on the kaimana and r3 pin on the ps4+ to fool the kaimana in thinking that r3 is share


According to the kaimana.h that I have, I think it’s pin 9. I have an 8 buttonNoJoyWithMenu setup.

#define  PIN_DOWN    11
#define  PIN_UP      18
#define  PIN_LEFT    19
#define  PIN_RIGHT   20
#define  PIN_HOME    8
#define  PIN_GUIDE   8
#define  PIN_SELECT  9
#define  PIN_BACK    9
#define  PIN_START   10
#define  PIN_P1      3
#define  PIN_P2      2
#define  PIN_P3      0
#define  PIN_P4      1
#define  PIN_K1      4
#define  PIN_K2      21
#define  PIN_K3      12
#define  PIN_K4      6
#define  PIN_LED     23


When you use an adapter you should have the adapter be first in the chain with a standard 4pin connector, then you use the 4pin to 3pin adapter thats in the kit from the adapter to the first J2 in the chain.

Theres no specific requirement for wiring order but I usually follow the order in the file since its easier to remember.

This is correct, no kaimana supports R3/L3 at the moment. In order to do that a mayor hardware revision would need to be done.

Good idea.


Where would I tap in for power on a hacked hori fighting commander 3. I don’t see a vcc, only vdd which I already tried and didn’t work

Nvm, I’ll just use my meter and test the points on the usb connection


I just recently threw my Kaimana mini in my drawer after a year & a half of trying to get the annimations like on some youtube videos show the tasu annimation or the special double fireball motion. Sucks because I had to barrow a pc laptop since my home uses Mac stuff. I completely gave up out of frustration since its a lost cost for me.

great product, wished I could program it they way I wished with animations instead of only the color changes. hyper depressed here


Is there any updates on the new code you are working on @JRDIBBS ?


I really want to use this awesone device to its full potental but I have no clue and nobody at PAS could help me out .


Hello Everyone! Managed to get away after surviving food comas and mall stampedes to bring youTHE Kaimana base code for J2s.

Why is this different from all the other ramblings I’ve produced? Well this code is developed using the original code as a base which means it runs under Arduino 1.6.3. It has the new animations plus easy customization using the settings.h file. Right now the code as the original supports only the FULL kaimana LED kit ( 8 buttons, 3 menus and JoystickLED). This should get rid of the issue when flashing the factory Kaimanas before we send them over to you.

I need your help to guide development of the kaimana
Right now I am determining which layout to code in next but i would like to hear what you have to say! CLICK HERE to answer a 1 question survey regarding which layout you plan or are using (or want to see done first)

Well you can download the code above and give it a try, I just recorded a quick video and will link it showing the animations are there. The inputs are a bit unforgiving because of the polling mechanism that was originally implemented. https://www.youtube.com/watch?v=hzSkK9ycCnE