Servo Help
aeading
Posts: 3
Hi All
·
New to PBASIC im using a Pro Dev board with continuous rotation servo connected (Shipped with the kit)
using the following code I would expect to see the servo rotate for 3 seconds but the servo will only run
for a second or so. I have linked led to the pulse so I can see, it stays lit but the servo stops rotating.
·
please excuse me if I’ve missed something silly as im new to PBASIC.
·
Thanks
·
' {$STAMP BS2}
' {$PBASIC 2.5}
·
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>·
DEBUG "Test"
·
counter VAR Byte
·
DO
·
FOR counter = 1 TO 122
·
PULSOUT 15,800
·
PAUSE 20
·
NEXT
·
FOR counter = 1 TO 122
·
PULSOUT 15,100
·
PAUSE 20
·
NEXT
·
LOOP
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>·
·
New to PBASIC im using a Pro Dev board with continuous rotation servo connected (Shipped with the kit)
using the following code I would expect to see the servo rotate for 3 seconds but the servo will only run
for a second or so. I have linked led to the pulse so I can see, it stays lit but the servo stops rotating.
·
please excuse me if I’ve missed something silly as im new to PBASIC.
·
Thanks
·
' {$STAMP BS2}
' {$PBASIC 2.5}
·
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>·
DEBUG "Test"
·
counter VAR Byte
·
DO
·
FOR counter = 1 TO 122
·
PULSOUT 15,800
·
PAUSE 20
·
NEXT
·
FOR counter = 1 TO 122
·
PULSOUT 15,100
·
PAUSE 20
·
NEXT
·
LOOP
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>·
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Applied and it all works fine.
Thanks Stephen.