Shop OBEX P1 Docs P2 Docs Learn Events
pulsin command — Parallax Forums

pulsin command

science_geekscience_geek Posts: 247
edited 2007-06-02 06:29 in Robotics
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

  • Joe FishbackJoe Fishback Posts: 99
    edited 2007-05-29 02:10
    The following is part of my program that takes the outputs from RC reciever channel 1 & 2 (controlled by one of the control sticks on the RC Transmitter) and this gives you single stick control on a BoeBot. You have to add the variables and type of Stamp & Revision·at the start of this program. I do not know what you really want, but hope this will be of help.

    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-
  • science_geekscience_geek Posts: 247
    edited 2007-05-29 13:53
    actually this is exactly what i wanted, it shows me how to use the rc transmitter/receiver and how to use the pulsing command, thanx a million
  • science_geekscience_geek Posts: 247
    edited 2007-05-29 23:11
    devil.gif·what variables do i need
  • D FaustD Faust Posts: 608
    edited 2007-05-30 01:15
    You would need variables for all of the signals that you are getting from the remote controller.· In this program they are drive and steer, put into formulas to control the pulses to the servos.· Where is a good place to get a rc contoller/where did you get yours?· Thanks

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    D Faust
  • Tom CTom C Posts: 461
    edited 2007-05-30 03:22
    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!
  • science_geekscience_geek Posts: 247
    edited 2007-05-30 13:52
    i got mine from my grandpa when he passed away, so i have like six of them, i think he got his from tower hobbies they have a website, but they are kind of expensive
  • Joe FishbackJoe Fishback Posts: 99
    edited 2007-05-30 23:00
    Science_Geek,

    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-
  • science_geekscience_geek Posts: 247
    edited 2007-06-01 02:25
    there is one more thing i need to ask you, how do i hook up the reciever to the boe
  • Tom CTom C Posts: 461
    edited 2007-06-01 21:26
    Joe,

    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!
  • science_geekscience_geek Posts: 247
    edited 2007-06-02 06:29
    everyone can stop worrying i got the code to work thanx for all the help now for the plan MWHAHAHAHAHAHA(supposed to be evil laught)HAHAHA(ok not that funny) but really thanx for the help
Sign In or Register to comment.