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);
}