Besoin d'aide pour programmation d'un servomoteur

Il faudrait que je rajoute :
if (!Servomoteur.attached())Servomoteur.attach(9);

Avant chacun de mes "if", "if else", et "else" alors ?