papillon2012
New Member
hello !
First : excuse my english, but i'm french (nobody's perfect )
Here's my problem : i want to use a servo in my project. So I bought a 9g miniature servo. My project is based on a 18M2.
i tried the code in the manual :
but my servo doesn't act as i expected : i thougt it would stay in position '150' during 2s and then go to position '225' and keep this position during 2s and so on...
here's the way my servo acts : it goes to '150' and immediately go back to 75, then it waits 2s and it goes to 225, it goes back immediately to 75 and so on...
Is the behavior of my servo normal ? and how can i do to obtain what i want to : i want my servo to keep the position i need, during the time i decided...
Thanks
Fred
First : excuse my english, but i'm french (nobody's perfect )
Here's my problem : i want to use a servo in my project. So I bought a 9g miniature servo. My project is based on a 18M2.
i tried the code in the manual :
Code:
init: servo 4,75 ‘ start servo on 4
main: servopos 4,75 ‘ move servo to one end
pause 2000 ‘ wait 2 seconds
servopos 4,150 ‘ move servo to centre
pause 2000 ‘ wait 2 seconds
servopos 4,225 ‘ move servo to other end
pause 2000 ‘ wait 2 seconds
goto main ‘ loop back to start
here's the way my servo acts : it goes to '150' and immediately go back to 75, then it waits 2s and it goes to 225, it goes back immediately to 75 and so on...
Is the behavior of my servo normal ? and how can i do to obtain what i want to : i want my servo to keep the position i need, during the time i decided...
Thanks
Fred