Shop OBEX P1 Docs P2 Docs Learn Events
need help in pulse in — Parallax Forums

need help in pulse in

mohamedelnonomohamedelnono Posts: 6
edited 2011-02-16 09:17 in BASIC Stamp
i want to read pulse from the radio control receiver i'm using pasic stamp BS2px

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-02-15 15:54
    What's the question?

    Have you read the description of the PULSIN statement in the Stamp Manual (Basic Stamp Syntax and Reference Manual)? Do you understand what kind of signal is produced by the R/C Receiver? Remember that the BS2px operates at a different speed than most of the other Stamp models and the number returned by the PULSIN statement is slightly different for a given pulse width than, say, for the BS2. There's a document whose link is on the BS2px product page that summarizes the differences between the BS2px and the other Stamp models.
  • vaclav_salvaclav_sal Posts: 451
    edited 2011-02-16 09:17
    Here is a pseudo code for detecting initial change of input ( start of the pulse)


    Declare variable New , Old

    Loop
    Input New
    Compare New XOR Old

    If Compare then
    Process pulse
    Else
    Set Old = New
    Continue loop
Sign In or Register to comment.