Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define Moteur 10
- void PULSE_SERVO(int,float);
- void setup()
- {
- }
- void loop()
- {
- while(1)
- {
- PULSE_SERVO (Moteur, 1500);
- delay(20);
- }
- }
- void PULSE_SERVO (int PIN,float valeur)
- {
- long temp;
- digitalWrite(Moteur, HIGH);
- temp = micros();
- while((micros()-temp)<(valeur-27));
- digitalWrite(Moteur, LOW);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement