Here are the Servo Code example which I referred to
' Servo testing example const
servoPin as byte = 12 ' the pin the servo is on
dim pulseWidth as single ' the servo's pulsewidth
debug.print "start"
' set initial values for variables:
pulseWidth = ((maxPulse - minPulse) / 2.0) + minPulse
pulseWidth = maxPulse
' this sleep makes sure your main loop runs sub
servoTask()
' wait 20 milliseconds before pulsing again |
this code is on the Tom's site
'
Servo testing example dim
minPulse as single ' the minimum pulseWidth Sub
main() ' set initial values for variables:
' you may need to change the minimum and maximum
minPulse = 0.0008
' the main loop:
' increase the pulsewidth for the next pulse:
' wait 20 milliseconds before pulsing again |