Accomplishment: I adjusted the final code and now it works. If I can shake the nightdress more than 8 times in 2 seconds. The LEDs will light up. And if I lie it down which puts the board in a horizon position and keep it for more than 2 seconds all the LEDs will be off.
Difficulties: when I shake it, some conductive threads will touch each other which influences the results.
Plan for next week: put all the elements on the nightdress.