Shop OBEX P1 Docs P2 Docs Learn Events
Please help with code — Parallax Forums

Please help with code

HimszyHimszy Posts: 28
edited 2005-03-14 22:32 in BASIC Stamp
Hi,

I need some code to read pulses from a r/c rx sent from my tx. I need the code to read the pulse on pin1 and if·the stick is moved 1/2 halfway in any direction it will add 1 to a variable.

Thanks Michael

Comments

  • MacGeek117MacGeek117 Posts: 747
    edited 2005-03-13 21:32
    PULSIN should work.
    bugg

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    But I canna change the laws of physics, Captain!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-03-14 00:09
    I would recommend downloading the, "What's a Microcontroller?" text from the Parallax website and read through chapter 4.· It covers how to control a servo using the PULSOUT command.· Once you understand the control and timing, you could easily use PULSIN to read what is coming from your R/C receiver.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Tech Support
    csavage@parallax.com
  • HimszyHimszy Posts: 28
    edited 2005-03-14 20:38
    Thanks Chris, already downloaded just got to read it now.
  • HimszyHimszy Posts: 28
    edited 2005-03-14 22:28
    How should I connect the rx? I have 5v out 0v and pulse at a guess.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-03-14 22:30
    You don't need the 5V out, that would normally power your servo.· You need the 0V (Ground) and the signal (Pulse) line.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Tech Support
    csavage@parallax.com
  • HimszyHimszy Posts: 28
    edited 2005-03-14 22:32
    Thanks Chris

    Ignore the pm.
Sign In or Register to comment.