pulsin command
science_geek
Posts: 247
how do i use the pulsin command and if i were to use a remote control for an airplane controller, how would i do it
Comments
You must have a common "ground" between the RC reciever and the BOE.
'
'············
Normal Controls
RCcontrol:
·PULSIN 6 , 1 , drive·············· ' "pulsin" is from CH2 on RC ( forward or reverse )
·PULSIN 7 , 1 , steer·············· ' "pulsin" is from Ch1 on RC ( right or left )
·R_Servo = drive - 1875 + steer
·L_Servo = 1875 - drive + steer
·PULSOUT 12 , L_Servo············· 'left drive servo
·PULSOUT 13 , R_Servo············· 'right drive servo
·'PAUSE·· 10······················· 'pause not needed, program run time provides pause
GOTO RCcontrol
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
······ Joe Fishback
-Robots are my friends-
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
D Faust
Right now on eBay you can get the VEX R/C combo for anywhere from $5 to $20 plus shipping.
It is a six channel unit, four analog and two digital.
The only catch is that the servo output of the VEX receiver is serial and not individually decoded. However, decoding the serial output is very easy and is documented in the following article: http://www.allelectronics.com/spec/JS-6.pdf.
The article uses a SX28 which is much faster than the BS2, however I believe that using the PULSIN command will allow the BS2 to properly decode the pulse train. Check out my analysis in this thread: http://forums.parallax.com/forums/default.aspx?f=10&m=192613.
Just a thought.
Regard,
TCIII
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you are going to send someone to save the world, you·better make sure that they like it the way it is!
I when said to add variables, what I meant was that the part of the program posted was only the main part of the program. To get the the part to run you would have to add to this part the the things needed for a full PBasic program. Such as type of Stamp and Rev of PBasic you are using. Also all the variables used in that part of the program posted need to be "Defined".
What I am doing is sending the signals from RC reciever to the BOE and then have the BOE send the pulses needed to the RC Servos. The reason for this is if you let the signals go from the RC receiver to the RC Servos, the RC unit would control the servos directly all the time. If I run the signals though the BOE, I can have the program check my sensors first. Then if any thing is detected by the Robot's sensors the Robot program can take control the the Robot and do something to avoid objects. If nothing is detected by the sensors then the RC unit could control the Robot.
If you would like to see what my Robot looks like and what all it can do, go to the following Parallax site- http://www.parallax.com/html_pages/resources/custapps/app_super-bot.asp
If I can be of any other help, let me know.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
······ Joe Fishback
-Robots are my friends-
What method did you use to allow the BS2 work with the servo pulses coming from the RC receiver?
By the way, nice robot!
Regards,
TCIII
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you are going to send someone to save the world, you·better make sure that they like it the way it is!