There are some examples for using a servo motor in the Arduino IDE: File>Examples>Servo. You will find two examples; they are really helpful if you are starting with servos.
I also wrote a servo library if you prefer using Python instead of the Arduino IDE. You can check this servo library in here: makers-examples/Python-Examples/Servo at master · MakersTeam/makers-examples · GitHub. There are also two examples that can be helpful for you.
I hope you find this information useful. If you have further questions, don’t hesitate to ask.
You can follow these documents/projects to get some more information if needed as you are on the start and it could be easier for you.
IOT Edison with Servo by Intel http://www.intel-software-academic-program.com/courses/diy/Intel_Academic_-_DIY_-_InternetOfThings/IntelAcademic_IoT-Edi…
The python code you wrote does not work for me. When I'm running the sweep example with a continuous servo, it just keeps going in one direction at a constant speed, no matter what value is written to it.
I have the servo connected to pin 3, 5v and GND of Edison board. My system version is 16.
Any idea what goes wrong?