Raspberry pi servo only moves when using varialbe duty in a while loop python
I am a beginner with programming on with GPIO and i am trying to understand servo’s. Right now have a code that moves the servo 180 degrees in stepts with 2. This is in a while loop. But when i use the same command but outside the while loop it does nothing for example servo.ChangDutyCycle(6) does nothing. In the while loop i also need to use duty if a use a contant for example 4,6,8 etc the servo doesn’t move. Can someone explain pls.