Basic Stamp Logic Analyzer Gate Remote code made
sam_sam_sam
Posts: 2,286
I need a code routine written for the result that shown below Basic Stamp Logic Analyzer Gate Remote how would I being to write this routine
Here are the photo snap shots of the output of the remote control for the Gate Opener Remote RF receiver output pin
' {$STAMP BS2}
' {$PBASIC 2.5}
'
Pulse PIN 15 ' pulse input pin
'
#SELECT $STAMP
#CASE BS2, BS2E, BS2PE
Scale CON $5 '
#ENDSELECT
'
time VAR Word
'
Main:
PULSIN Pulse, 0, time ' measure positive pulse
'
IF (time > 0) THEN ' if not 0
time = time */ Scale ' adjust for Stamp
'
DEBUG CR, DEC4 time, " us " ' display microseconds
'
ELSE
'
DEBUG CLS, "Out of Range" ' else error message
ENDIF
'
PAUSE 200
GOTO Main
END
Here is a sample of what I get when I run this code
35
35
04
04
35
35
04
04
35
35
and so on
How can I write something that would read this as
IF time = (35,35.04,04) THEN do something
This pattern repeat it self as long as you hold the button on the remote for the gate
Here are the photo snap shots of the output of the remote control for the Gate Opener Remote RF receiver output pin
' {$STAMP BS2}
' {$PBASIC 2.5}
'
Pulse PIN 15 ' pulse input pin
'
#SELECT $STAMP
#CASE BS2, BS2E, BS2PE
Scale CON $5 '
#ENDSELECT
'
time VAR Word
'
Main:
PULSIN Pulse, 0, time ' measure positive pulse
'
IF (time > 0) THEN ' if not 0
time = time */ Scale ' adjust for Stamp
'
DEBUG CR, DEC4 time, " us " ' display microseconds
'
ELSE
'
DEBUG CLS, "Out of Range" ' else error message
ENDIF
'
PAUSE 200
GOTO Main
END
Here is a sample of what I get when I run this code
35
35
04
04
35
35
04
04
35
35
and so on
How can I write something that would read this as
IF time = (35,35.04,04) THEN do something
This pattern repeat it self as long as you hold the button on the remote for the gate
Comments
Your post is a little hard to follow. Are you asking for BSLA code, (which would be good to have), or are you going to supply some code?
Jim