The JSN - SR04T is compatible with the basic stamp homework ?
michaelarana
Posts: 2
Hey there
I'm experimenting with JSN - SR04T and BASIC Stamp Homework module , this is my code
I have probrado with HC SR04 and works very well , but when tested sim with JSN - SR04T fails, the module is unable to send any signal ultrasound.
there I have my question if this module supports basic stamp ?
Excuse my bad English
Postscript ; this is the image module
[img][/img]
I'm experimenting with JSN - SR04T and BASIC Stamp Homework module , this is my code
' {$STAMP BS2}
' {$PBASIC 2.5}
trig PIN 14
echo PIN 15
'*******************************
tiempo VAR Word
cm VAR Word
cm_max CON 20000
fuera_tiempo CON 0
'*******************************
DO
IF echo = 0 THEN
PULSOUT trig,5
PULSIN echo,1,tiempo
cm = tiempo/29
'IF cm <= cm_max THEN tiempo = fuera_tiempo
ENDIF
DEBUG HOME, "time = ", DEC5 tiempo, CR
DEBUG ? cm
PAUSE 50
LOOP
I have probrado with HC SR04 and works very well , but when tested sim with JSN - SR04T fails, the module is unable to send any signal ultrasound.
there I have my question if this module supports basic stamp ?
Excuse my bad English
Postscript ; this is the image module
[img][/img]
Comments
I think the range is indicated by the period between the trigger pulse and the echo output, rather than the pulse width of the echo signal as is the case with Ping))). If this is, in fact, the case, you will not be able to use PULSIN and I cannot think of a way to use it with BS-2.
HC- SR04 works with the BS2 and PULSIN , the problem is with JSN - SR04T model which is similar but does not work
Because it is defined as a PIN, not CON, it is used as an input.
Here is a pointer to the HC SR04 this link, which does return a variable-length pulse. The two parts are not the same.