Homemade button to test how hard it was hit

Would anti-static foam work? Such foam typically is conductive and has a certain resistance; when it is compressed, this resistance changes...