This is code for Arduino. Electronic schema is here:

lightshow in action: