Make a percusive servo beater

but I was not able to adapt your code to my configuration with an arduino mega or uno

Odd because it was a Uno project so it should not need any changing.