RGB switching impact sensor?

I'm trying to figure out how to have the RGB switch colours each time the Piezo sensor is activated..

so it goes like this:

Hit once, RGB shows yellow for 5 seconds then turns off.
Hit twice, RGB shows orange for 5 seconds then turns off.
Hit thrice, RGB shows red until the arduino is switched off.

Currently I'm able to make it show all 3 colours when hit (based off the knock codes) but I'm not able to separate them into different instances..

I'm trying to figure out how to have the RGB switch colours each time the Piezo sensor is activated..

You make it sound like the piezo sensor is a digital sensor - on or off. It is NOT.

but I'm not able to separate them into different instances..

My crystal ball says to fix lines 27 to 35 of uselessCrap.cpp. But, I think it might be broken. You should probably read the sticky posts at the top of this forum for a clue.