I just succeeded in making Macromedia Director write random letters to my basic stamp which then echos them back to Director. Some strangeness in the communication as two control characters I'm sending aren't showing up in Director. Here's the BS2 code:
'{$STAMP BS2} s var byte Main: '** pause 6000 serin 16,84,500,go,[dec s] debug dec s debug "5" s = 0 debug "Done" end
go: debug "No Data", CR goto Main
I used s as a variable for simplicity. Will likely change it to something more descriptive like "SerData".
Hmm... just noticed that end should be goto Main. Now I'm curious why the program is working at all.
Turns out the "Serin" command, when given dec in the variable section, searches for decimal numbers until a non-decimal character shows up. Why then is it debugging the result out? It must keep gathering data and let the program move on? But then, why aren't "5" and "Done" showing up? Hmm.... Mysterious.

del.icio.us
Digg
Google bookmark
reddit
Simpy
StumbleUpon
Furl
Newsvine
Technorati
Tailrank