Shop OBEX P1 Docs P2 Docs Learn Events
PWM to speed controller — Parallax Forums

PWM to speed controller

ChazChaz Posts: 18
edited 2009-08-13 03:20 in BASIC Stamp
I having problems arming a speed controller. In order for it to arm it needs to read the lowest throttle position at 1 microsecond at 50 hz. I am using the basic stamp 2px so that would correspond to a pulsout of 1250 right? Well here is my code.
' {$STAMP BS2px}
' {$PBASIC 2.5}


reps VAR Nib



For reps = 1 To 6000

Pulsout 12, 1875

Pause 18

Next

For reps = 6000 To 12000

Pulsout 12, 1250

Pause 18

Next

For reps = 12000 To 20000

Pulsout 12, 2500

Pause 18

Next

End



So it starts at middle throttle then go low to arm then go high to spin the motor but the problem is nothing is happening after it arms. I know it is arming because the motor gives be a double ascending tone. I am not sure the For/Next commands are working cause i have never used them before, but i tried the program without the For/ Next commands and the it arms but nothing happens. Any help would be greatly appreciated.


Thanks

Comments

Sign In or Register to comment.