Arduino en technologie - Créer son blog
Arduino en technologie - Créer son blog
Arduino en technologie - Créer son blog
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Servomoteur<br />
Un servomoteur est un moteur dont on<br />
peut commander la position angulaire, de<br />
0° à 180° avec précision.<br />
Le fil jaune ou blanc se connecte à D9.<br />
Fils<br />
Fil noir<br />
Fil rouge<br />
Fil jaune ou blanc<br />
Connecté à la broche<br />
Gnd<br />
5V<br />
D9<br />
D9<br />
Exemple : faire tourner le servomoteur de 0° à 45° par<br />
pas de 5°<br />
Fonctions<br />
angleservo(angle);<br />
Comm<strong>en</strong>taires<br />
angle est compris <strong>en</strong>tre 0 et<br />
180. Il correspond à l’angle<br />
auquel le servomoteur se<br />
déplacera.<br />
void loop()<br />
{<br />
angleservo(0);<br />
for(int i=0; i