Pulsin
Armored Cars
Posts: 172
I cant seem to get this to work, if someone could help me out that would be great.· Im trying to read the pulse from an RC reciever and send it to an RC servo.· Ive tried this:
MANUAL:
· mansteer=PULSIN 2
· mandrive=PULSIN 3
· PULSOUT steer, mansteer
· PULSOUT drive, mandrive
· GOTO MANUAL
and this:
MANUAL:
··PULSOUT steer, PULSIN 2
· PULSOUT drive,·PULSIN 3
· GOTO MANUAL
and nethier tolkienize.· Im out of ideas.
This also leads me to another question, can I use the OEM BS2s 5v regulator to run an RC reciever or would that put too much load on it?
MANUAL:
· mansteer=PULSIN 2
· mandrive=PULSIN 3
· PULSOUT steer, mansteer
· PULSOUT drive, mandrive
· GOTO MANUAL
and this:
MANUAL:
··PULSOUT steer, PULSIN 2
· PULSOUT drive,·PULSIN 3
· GOTO MANUAL
and nethier tolkienize.· Im out of ideas.
This also leads me to another question, can I use the OEM BS2s 5v regulator to run an RC reciever or would that put too much load on it?
Comments
"Basic Stamp Programming Manual".· It's really
excellent.
You used the wrong syntax on the PULSIN statement.
' {$STAMP BS2}
' {$PBASIC 2.5}
ManSteer VAR Word
ManDrive VAR Word
Steer CON 4
Drive CON 5
· LOW Steer· ' Set default state to 0 volts
· LOW Drive· ' Set default state to 0 volts
MAIN:
· ' Servo Pulse is a normally LOW signal, pulsing
· ' high for 1 to 2 mSec.
· PULSIN 2, 1, ManSteer ' Read pulse width in 2 uSec 'ticks'
· PULSIN 3, 1, ManDrive
· ' Note 'PAUSE 20' not needed here, since ManSteer and ManDrive
· ' PULSIN should have a Pause already built in...
· PULSOUT Steer, ManSteer· ' Since default low, PULSE high.
· PULSOUT Drive, ManDrive
· GOTO MAIN