Trouble with an RGB LED and accelorometer

I can't believe I did not think of that.

Thank you Mike.

Yet again I need a stamp on my forehead that says KISS :-[