Rainbowduino - problems with programming


First step was easy - mount matrix on Rainbowduino, apply power, look at colourful display, smile.

Now, nothing works. I built the example code, used a usbtiny programmer to write the CMD v2.0 to the Rainbowduino, built the Seeedmaster code, downloaded it to a 2009 and connected them. Applied power to both - black matrix :frowning:

Is there a way to test this? Or a minimum piece of code running on the Rainbowduino to show that the programming and leds are working?


Hi Jen,

If you load the default program the entire matrix should light up.

Double check and get back to us


Default program? Where?
(The RainbowduinoCMD_Beta?)

Best regards,
Jens (Yes, with “s”, as is nordic John :slight_smile: )

the rainbowduino should come with the same code that you can download on the product page.

the product page has a link to the software. it has a seeeduino code for controlling it, as well as the rainbowduino code.


I now did the following:

  • follow link, unpack
  • open Rainbow_CMD_V2_0 with Arduino 0017
  • compile (resulting sketch size 5688 bytes)
  • connect SparkFun AVR Pocket Programmer to Rainbowduino -> PWR LED is green.)
  • avrdude -c usbtiny -p m168 -U flash:w:Rainbow_CMD_V2_0.cpp.hex
  • lights flash, verfy is OK.
  • disconnect programmer
  • attach external power supply, pwr LED green
  • press RESET, reset LED red.
  • remove power
  • add LCD matrix (square pin in round hole).
  • reattach power supply -> pwr LED green.

Still nothing happens…

I’ll probably do something wrong along the way :frowning:


Confirm your matrix is actually working. Can you hook up a simple power > resister > matrix > gnd circuit. That way you can rule out the matrix being faulty

The matrix DID work before I updated the flash ROM. :frowning:

This makes me think it has something to do with a misprogrammed ATMEGA 168.

Or do the LEDs die easily?

Freezing posted in the blog a great guide to uploading to the rainbowduino. in the blog a usbuart was used but you can replace the parts that reference it with your usb tiny for the programmer.

here is the link to that blog post.

when you write to it, are you adjusting the fuse values? i had a rogue rainbowduino and had to redo the bootloader on it, you might need to redo that.

Thanks for that!

I did that yesterday. So… Best thing to do is probably go through it step by step again. If the Rainbowduino is Arduino compatible, I could give talking to the FTDI Basic breakout module a try, by uplaoding a simple “talk to serial” sketch.


(Too tired today to try much more.)

Yeah a simple FTDI breakout will work fine.

You could try my adaptation of the V1 Rainbowduino code - That has a “I’m alive” sketch at the beginning


As for the LED hardiness… Yeah they are pretty reliable, I doubt you’ve fried it unless you’ve done something strange

I feel a little thick - but where would I find that?

Best regards,

PS: Your signature is spot on. Thinking back to 6502 systems talking assembler only, with horrible interfacing - one of the reasons most people didn’t want to handle microcontrollers at that time. Arduino is a brilliant concept - haven’t had as much fun coding in ages :slight_smile:

EDIT: Found your Wiki, browsing…

Thanks, all!

It was some kind of learning experience. After using Miles’ sketch, nothing happened again. His “Hello world” in combination with the jyetech scope showed me that something was wrong with the serial world, too. I re-wrote the bootloader, applied his sketch again - and wow, is this matrix bright! :slight_smile:

Write the original sketch - fail.

Deleting original sketch .o files etc, then rebuild with correct platform set, write to Rainbowduino - I ger a test pattern! YAY!

I should be on my way now.

Again, thanks for your help!


glad to hear its all working!

Well, ALMOST all is working.

I now manage to edit, compile and upload the sample firmware, using something like

  for(int i=0;i<4;i++)

Images do change, but the “top line” (towards RESET) always has the blue LED part on.

(Already seen on the “default pattern”, btw.)

Known problem? Software issue or does it look like a hardware thingie?


Try to modify the Prefabnicatel[5][3][8][4] in data.c to preset the picture to all red or green , then check if the blue still there.

OK. Modified the sketch to walk through the colours.
Now a DIFFERENT line is acting up.

Aha… I use two different power supplies, giving different results.
One will make the LEDs blink rapidly after some time, the other one won’t.

I should solder a 9V battery power supply and try that…


New results:

Switched from simple wall wart to stabilized, way more expensive wall wart with adjustable voltage. :slight_smile:

Tried voltages from 3V (no show) to 9V.

Matrix had at least one failing line with all voltages. :frowning: