Tring to build a sound activated servo but code won't work

For information about powering a servo from an external supply see
About Servos