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.
Comments
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.
Declare variable New , Old
Loop
Input New
Compare New XOR Old
If Compare then
Process pulse
Else
Set Old = New
Continue loop