1

I have my servomotor conencted to my raspberry pi and I have set wiringPi but I'm only able to make it turn. I'm searching for a way to give him a specific angle.

The code I'm using to make it turn:

    #include <stdio.h>
    #include <wiringPi.h>
    
    int main() {
        printf ("Raspberry Pi wiringPi test program\n");
        wiringPiSetupGpio();
        pinMode (18, l) ;
        pwmSetMode (PWM_OUTPUT);
        pwmSetRange (1024);
        pwmSetClock (375);
        pwmWrite(18, 10);
    
    }
possum
  • 1,837
  • 3
  • 9
  • 18
Louis
  • 83
  • 7
  • 1
    Is it a positional rotation or continuous rotation servo motor? Or by "only able to make it turn", do you really mean that you're able to hold a position, but not a specific one? – Thomas Jager May 21 '22 at 14:37
  • Servos typically require position feedback. – Martin James May 21 '22 at 17:35
  • It's this one [link](https://www.gotronic.fr/art-servomoteur-s4303r-20725.htm) and it should hold a position – Louis May 22 '22 at 21:00

0 Answers0