Serin with USB
Hello,
I'm trying to use Matlab to run my basicstamp program and just learning about the Serin/Serout commands. I found the sample program for Serin:
' {$STAMP BS2}
' {$PBASIC 2.5}
SERIN 1, 16468, [WAIT("SESAME")]
DEBUG "Password accepted"
END
However, when I run it nothing happens when I type SESAME...
Does the Serin command work with USB connections?
Thanks
I'm trying to use Matlab to run my basicstamp program and just learning about the Serin/Serout commands. I found the sample program for Serin:
' {$STAMP BS2}
' {$PBASIC 2.5}
SERIN 1, 16468, [WAIT("SESAME")]
DEBUG "Password accepted"
END
However, when I run it nothing happens when I type SESAME...
Does the Serin command work with USB connections?
Thanks
Comments
If you have a USB Board of Education or a serial Board of Education with a USB to Serial adapter, you can use a pin number of 16 in your SERIN statement. As explained in the Stamp Manual, there is no I/O pin #16, but Stamp Basic uses 16 to specify that the SERIN should use the programming serial port (SIN/SOUT) for the SERIN input. You can also use 16 in a SEROUT statement to send data to the PC over the serial port. Also look at the DEBUG and DEBUGIN statements which also use the programming serial port. They're really special forms of the SEROUT and SERIN statements.