Spin interpreter over serial?
pico
Posts: 29
in Propeller 1
Hey guys,
is there any way to access the Spinterpreter over serial? Kind of like how I can access a Bash prompt over serial on the Raspberry Pi?
I'm learning spin and I want a Spin prompt where I can just play with the language and get instant feedback.
Thanks!
is there any way to access the Spinterpreter over serial? Kind of like how I can access a Bash prompt over serial on the Raspberry Pi?
I'm learning spin and I want a Spin prompt where I can just play with the language and get instant feedback.
Thanks!
Comments
Can you provide me with the code, or at least tell me how?
The Spin compile, download, and execute is so fast that it is almost like having an interactive interpreter.
http://forums.parallax.com/discussion/114023/sphinx%C2%97as-seen-at-upew
Maybe the terminal code could be adapted to work on a serial terminal, instead of TV.
It doesn't look like its been worked on in quite awhile, but the links on the referenced site seem to work still.
I've never tried it myself...I think I was too green back then. Having dug it up, now I want to try it...
Cheers,
Jesse
"Spin" itself is not designed as an interactive language since the compiler runs on the PC and simply generates Spin byte code (and assembly if included) which is run by the Spin byte code interpreter in ROM on the Propeller. This is not an interactive terminal interface "interpreter", it is a VM that simply reads compiled byte codes and decodes and executes them etc.
If you want interactive you should have a look at my Tachyon, you can even interact with FAT32 files on SD and over the Internet etc.
Here are some simple one line "scripts" which could run from the serial port or even create a new definition with as shown. The ASCII character script takes less than 4ms to execute at 921600 baud but 672us if not limited.
Create a new function on the fly and execute it by name.
Sorry, but you will need an editor on the prop. I don't know of any
Sounds nice.