Voici le programme:
#include <Servo.h> Servo servoLeft; Servo servoRight; void setup() { servoLeft.attach(13); servoRight.attach(12); servoLeft.writeMicroseconds(1300); // Servo gauche: sens horaire servoRight.writeMicroseconds(1300); // Servo droite: sens horaire delay(3000); servoLeft.writeMicroseconds(1700); // Servo gauche: sens anti horaire servoRight.writeMicroseconds(1700); // Servo droite: sens anti horaire delay(3000); servoLeft.writeMicroseconds(1500); servoRight.writeMicroseconds(1500); } void loop() { }Le câblage est correcte en principe, puisqu'il suit le circuit suivant:
Exemple du servomoteur associé à la borne P13 de la carte Arduino Uno
- P13 => fil blanc servomoteur avec sa LED et sa résistance de 470 ohm comme dit dans le bouquin du boe bot
- borne 5V => fil rouge servomoteur
- Masse => fil noir servomoteur
J'aurais besoin d'aide, car je ne vois pas du tout d'où vient le problème.