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

Awesome! Now I fixed this on my fork of the code let me get home and I’ll give you the correct declaration. @armi0024 we need to bring this update to the main branch.

Ok so we did nothing wrong, right? I mean, we just need to download the fixed one and should work, right? We’re really pumped up right now, knowing that we kinda worked thru this and we’re almost there :smiley:

Nope you’re not doing anything wrong. This is becuase the datatype is deprecated in the newer Arduino builds. In the Kaimana_custom.h file change both prog_uint8_t to uint8_t, they are at the bottom of the file.

It still fails at uploading to the board, the verifying works perfectly but this error shows up when we try to upload to the board:

avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
Found programmer: Id = “S”; type = p
Software Version = V .Hardware Version = v.M
avrdude: error: buffered memory access not supported. Maybe it isn’t
a butterfly/AVR109 but a AVR910 device?
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: error: programmer did not respond to command: leave prog mode
avrdude: error: programmer did not respond to command: exit bootloader
avrdude: error: programmer did not respond to command: exit bootloader

@El_Harry
A few questions in order to better assist you

  1. Mac or PC?
  2. Arduino version? 1.0.x, 1.6.x?
  3. Kaimana mini or Khameleon?

If you are on Khameleon do make sure you’ve entered into Arduino mode by either:

  1. Press onboard tact switch and look at indicator led
  2. Press home + low kick (does the same as 1)

In the Arduino IDE can you select board and port to match the Kaimana

  1. COM + # on PC, tty on Mac
  2. Board can be Micro, Leonardo or Feather

If you live to hate the Arduino IDE and use Sublime or Atom, both have Arduino packages available

I prefer the Sublime version as it allows you to compile and upload right from the text editor

You can also change all your compiling settings and do not need to conform to Arduino IDE

Happy programming

One interesting solution I found browsing the forums below. Try this and report back, also try another computer, the boards are sometimes very finicky about where it’s connected.

[details=Spoiler]Hello all!!
I had the same problem with my Arduino Leonardo and my Windows 7. After trying many things, I found a solution.
First: you must find the COMx used for your “Arduino Leonardo” in the “Device Manager” of Windows.
Second: make double click to see the properties of the device, and go to the "Port configuration tab"
Third: enter in “Avanced Options” and deactivate “Use FIFO buffers”, and accept all changes.

That is it, now you can program your Arduino Leonardo without the error …“buffered memory access not supported”

I hope this will be useful!!! :slight_smile: :slight_smile: . [/details]

  1. PC
  2. Arduino version 1.6.12
  3. Kaimana mini

In the Arduino IDE I can select only COM3 as port and I can select Arduino Leonardo board (between many more)
Of course I selected Arduino Leonardo board and COM3 port

I think I could try to use Sublime or Atom, never heard of them (sorry, first time doing stuff like this)

Thanks :smiley:

I’m about to test it right now, hopefully it’ll fix my issue.
I’ll post asap the results

Thanks again :smiley:

Ok, now it works but it’s because my friends and I are just simply retarded. Let me explain myself.
We did follow every step of the tutorial BUT we misunderstood (because we are pretty dumb) the part where the kaimana board must be plugged to the PC by the microUSB cable. We just plugged the USB of the actual arcade stick to the PC and maybe, just maybe that’s why it failed everytime we tried to upload to the kaimana board.
I’ve been rewatching all the videos, step by step and I found the mistake we were making, tried it with the kaimana board plugged to the PC by the microUSB and worked perfectly.

I’m really sorry to bothered you with our problems because we just missed that bit of the tutorial (it’s an annotation on the youtube video tutorial). We’re really dumb.
Thanks and sorry again, really :i_dunno:

Lmao! no worries I should have asked that first and will be next time anyone comes with an issue. Feel free to continue posting here or pm me if you have questions!

We are working on revamping the support site so any questions you ask will help us build it.

Thanks man, we really feel retarded :smiley:

Quick update:

Turns out I did a fail, and the reason the stick wasn’t working was in fact because I’d manage to put the “collar” that goes on before the sping and actuator on the wrong way round and not because of an incorrect hollow shaft length (which was the initial jumped to conclusion!)

I’ve found a shop nearby that sells a slightly smaller terminal barrier strip, so going to try that tonight or tomorrow and see if it’ll hold the tiny wires, if not I might have to resort to PCB tech, but haven’t yet found any PCB “pass through” terminals - and really trying to avoid soldering as I’m trying to keep it all easily take apartable (yes thats definitely a word nods)

But fingers crossed the slightly smaller terminal barrier strip works.

I see, glad to know it wasn’t a part issue! Don’t look specifically for pass through terminals. Look for smaller screw in terminals and just screw same wires to the same terminal.

Oh so strip both wires, and stick them both into the same hole?

Exactly. Makes a sound connection and also helps thicken up the wiring at the terminal for a better grip.

I’d given up on figuring all this out a while ago, browsing through this entire thread again, it still seems no one has answered the questions I had, closest thing being people saying “I’ve figured it out”, and “I pmed you how”. Why isn’t that information shared to the public?

I’m trying to figure out fading when the button is released, and tournament mode. I’ve found numerous youtube videos and people showing it off, but no explanations of how they did it, or example code. Even a dump of whatever code they’re using would have been handy.

I’ve been looking through arduino tutorials, but it seems like theres limited info on indexed led’s, almost all the tutorials assume one led directly connected to an output pin.

I’ve got a simple 8-button layout running just the default code. I’d thoroughly appreciate help with this, and would appreciate even more if the wiki ever came back up. It’s like 20 pages of the same 4 questions in this thread because there’s no way to effectively search the info.

@Erehk I missed your original comments from June and my work with PAS is fairly recent, I’ll be glad to help!

A few comments here:

*I’d given up on figuring all this out a while ago, browsing through this entire thread again, it still seems no one has answered the questions I had, closest thing being people saying “I’ve figured it out”, and “I pmed you how”. Why isn’t that information shared to the public? *
*** All of this thread is being compiled in order to revamp the support site support.paradisearcade.com In order to have a more central info hub.

  • Some people work very hard to get their code to work and it’s their perogative whether to share it or not.***

I’m trying to figure out fading when the button is released, and tournament mode. I’ve found numerous youtube videos and people showing it off, but no explanations of how they did it, or example code. Even a dump of whatever code they’re using would have been handy.

Point 2 of the above applies here, but I put all my code In my GitHub. You’ll have to browse it a bit but it’s still a work in progress. whats the full animation flow here?

I’ve been looking through arduino tutorials, but it seems like theres limited info on indexed led’s, almost all the tutorials assume one led directly connected to an output pin.

Yeah you are looking for the right info, indexed LED’s are what we use but what are you looking for specifically?

I’ve got a simple 8-button layout running just the default code. I’d thoroughly appreciate help with this, and would appreciate even more if the wiki ever came back up. It’s like 20 pages of the same 4 questions in this thread because there’s no way to effectively search the info.

Back to the question one answer, we know its a pain to get through the pages while looking for info but soon we will have the support page updated!

@JRDIBBS
My apologies for that coming across the way it did. I was just a bit frustrated given the amount of time I had put into it with no success, and now that I read it again it’s a bit rash.

I appreciate that people may not want to share what they’ve worked on, I was really just surprised at the lack of information surrounding the code as a whole. I realize now it’s quite a niche area being used for a very specific purpose and so there is said lack of information.

I will browse what you’ve done, and if I get it all figured out I’ll make a tutorial for those in my position. Thanks for the hard work, and sorry again for my earlier frustrations.

I find it a bit silly that people don’t share their solutions simply because they have put some work into it. So I don’t think you came off hard criticizing

thats being said, @erehk pm me, I’d be willing to listen and help out (or at least point you in the right direction) with what you are trying to accomplish

Of course I think that it’s silly as well, but to each their own right? I like answering the simpler questions in pms such as issues where the kaimana isn’t even being connected. But in general I try to keep the discussion going for everyone’s benefit.

@Erehk I am available through pms as well but I will try to answer your original question here. The way I implemented tournament mode was to create a whole separate button detection function that did not have any led functionality. You should be able to find it in one of the .ino files the one in the kaimanaGeneric/Vanilla/ folder has most of the new stuff (I need to get that code wrangled, it’s insane but if you dig hard enough you can find hidden gems)

Fading when the buttons released is a really cool function, and by that I mean a literal math function. I have not tried to define your particular case but in my breathing animation I used a variation of the sine function that altered the brightness of the led.

First you have to create a function that modifies the brightness of the led and not the color. I just borrowed the setled function and expanded it using insight from @Vicko



void Kaimana::setLEDBrightness(int index, int iR, int iG, int iB,int alpha)
{
	iR = iR * alpha;
	iG = iG * alpha;
	iB = iB * alpha;
  // set led identified by index to the RGB color passed to this function
  if(index >=0 && index < LED_COUNT)
  {
    _led[index].r=iR;
    _led[index].g=iG;
    _led[index].b=iB;
  }
}  



Then using the sine function on the brightness you are able to define a set of values without having to create a large data structure. EDIT: here’s issues with this one I will find the working one and paste it. Ok this one works



int breatheSine(int iR, int iG, int iB)
{
	int index;
	int i;	
	while(true)
	{
	int breatheSpeed= 1;
	float factor = millis()/1000.0;
		int alpha = 129.0 + 127 * sin((factor*.50)* PI );
		//STROOOBE int alpha = 127.0 + 127 * sin((factor*3)* PI );
		// set all leds in the array to the RGB color passed to this function
		if (alpha != 0 ){
			for(index=0;index<LED_COUNT;++index)
			{
				kaimana.setLEDBrightness( index, iR, iG, iB,alpha );
			}
			
			// update the leds with new/current colors in the array
			kaimana.updateALL();
			// test all switches and exit idle animation if active switch found
			for(i=0;i<SWITCH_COUNT;++i)
			{
				if( !digitalRead(switchPins*) )
				return(false);
			}
	
			// place test for switches here and use calculated timer not delay
			delay( IDLE_ANIMATION_DELAY );
		}			
	}
  } 


Variations on the different math functions yield different results, I am building videos to explain this further.

Math is the coolest thing ever, my kid will learn precalc with a kaimana Lol.

Hi guys !
Does anybody have an idea if I can put a kaimana mini in a ps3 Street Fighter IV arcade fightstick ?
This model :

I know it has a common ground but I can’t really find a +5v Vcc on the main board. It looks pretty much as the TE version of the mad catz.
I have pictures for the board, but I don’t know how to put them in my post, if someone is interested.

Thank you

-Al-