Forth+FLiP+WX WiFi module
Rsadeika
Posts: 3,837
in Propeller 1
I watched the video of the first zoom presentation of TAQOZ in the P2 rom. It was quite interesting and informative, which got me to thinking about using Forth for my robot project.
Since Forth is an interactive experience that uses words, I am thinking of words as subroutines, I wonder if I could get it to work with the WX WiFi module and access the FLiP(Forth) remotely. When I use the word Forth, I am referring to the version that Peter created.
For my robot project I was considering creating an interactive IO using the C language, but if Forth has that already, this might save a few steps.
I am still not sure about a lot of the capabilities of Forth, things like multitasking, interaction with other devices using serial interface, and such.
So, what would it take, using Forth, to setup a remote session via WX WiFi module and Forth?
Ray
Since Forth is an interactive experience that uses words, I am thinking of words as subroutines, I wonder if I could get it to work with the WX WiFi module and access the FLiP(Forth) remotely. When I use the word Forth, I am referring to the version that Peter created.
For my robot project I was considering creating an interactive IO using the C language, but if Forth has that already, this might save a few steps.
I am still not sure about a lot of the capabilities of Forth, things like multitasking, interaction with other devices using serial interface, and such.
So, what would it take, using Forth, to setup a remote session via WX WiFi module and Forth?
Ray
Comments
I don't know, but I'll bet that Peter could sort that out quickly given he has Ethernet connectivity with Tachyon.
Now, as for the WX WiFi SIP module, I need some explanation as to how the module should be wired to the FLiP, when you want to use the transparent mode, of the WiFi module. I think the different wiring schemes should have been covered in the WX WiFi SIP manual.
Ray
https://sourceforge.net/projects/tachyon-forth/files/Tachyon/kernel/
I am still trying to figure out this transparent mode. So, I guess I will load tachyon, start up FLiP, and then use Tera Term to see what happens. I wish Parallax had more complete documentation for the WX WiFi SIP module.
Ray
This is getting to be a complicated session for trying out tachyon. I remember many years back, the last time I tried tachyon, it did not seem to be as complicated, I think it was way more straight forward.
Ray
A note of concern, when the WX WiFi SIP is on, tachyon does not respond to a keypress in the Tera Term terminal mode. When I turn off the WiFi, then tachyon responds, to a key press, in the terminal mode. Not sure what to make of that.
When I use Tera Term to make a connection via the WiFi, it opens up a terminal mode, but I get a connection that is refused. Not sure what to make of that either. This might take a lot of hacking to figure what will work.
Ray
The Tachyon .spin file is preprocessed from include files so I could make it totally Prop tool compatible.
I'll update this post once I've done that.
To make it Tachyon and TAQOZ easier to download from SourceForge I have put both binaries together in the one small zip file with the readme and made that the default file for the DOWNLOAD button.
btw, even though the binary is 64k, the Prop tool only uses the first 32k. The upper EEPROM can be loaded with ROMS with simple copy&pastes from the ROMs folder.
There is a line - INTERCOM: &05.78.32.55 @3,990, what the heck is that. From the memory that is left, 1366 bytes, it looks like everything got loaded.
I tried keying in 'help', but that comes up with '???', maybe a help that displays some very basic forth words that a beginner can use to explore the system, would be helpful, just my two cents.
Now comes the hard part, how to get the WiFi SIP module to work with Tachyon. So far the wiring between the FLiP and WX WiFi is not working with Tachyon. Anybody have any wiring suggestions?
Ray
BTW, Tachyon is not looking for something specific about the Flip since it doesn't even have microSD or RTCs etc. It is only detecting that EEPROM exists at $A0 and that's about all.
The ROMs are binary images that are stored in upper EEPROM in a file-like manner so that they can be loaded into cogs at runtime without taking up any of the precious 32k of RAM. These ROMs include UARTS (FDS and high-speed autoplex etc) as well as VGA and SIDCOG and F32 Floating point etc. They exist in the ROMs folder as a hex file with a header so all you have to do is copy&paste and when you do they load up automatically into upper EEPROM. Next time you boot it will report the ROMs that it detects.
If you run RECLAIM it will free up another few k as well.
As for testing the WiFi, I would just connect it up to the Prop's serial pins but I will have to check the schematics because Parallax have a habit of assuming that USB will be the only method of communications which won't make it easy to connect to P30,31 if that was the case. But I will check.
[QUOTE}
As for testing the WiFi, I would just connect it up to the Prop's serial pins...
[/QUOTE]
That is the way that is connected right now. The other wire is connecting the RESET on the FLiP and DI on the WiFi SIP module.
Ray
Before I move on to debugging the WiFi problem, I want to make sure that the Tachyon that is installed is bug free, so I know that if their is a problem it is with the WiFi and not Tachyon.
Ray
I tried the 'HELP', with this new setup, and HELP still does not display any information. Not sure if it is because I loaded the bin version of Tachyon, or maybe something else.
Now to find a list of some basic Tachyon words, so I can do some more testing.
Ray
here is what I have for the tachyon glossery.
jim
Treat it the same as SEE <word> and don't expect it to somehow be able to have reams of information on the little 32k P1. This would be possible in SD or a larger EEPROM and one day when I or someone else has some time, we might have those help files available.
A general observation of Tachyon. As to the way it is used with the Propeller, you could say it was an OS, loosely worded, with words, that could be used as batch or short hand script files. You have to get a good grasp of how to use that "short hand" to create the word. Once you get the hang of creating the useful "words", it looks like a very powerful system. I would shy away from calling it programming, in the way maybe C would be used.
For my purpose, it could be useful, once I figure out how to create a serial connection to the robot with the FLiP, and then sending and receiving commands from the robot. Using C that was almost painless to grasp, but with Tachyon, it looks like it might take some effort to get the correct syntax and series of words, to get the job done.
I will see how it goes with using the RS_Jim pdf file, and then how it goes with some preliminary uses with Tachyon.
Ray
By definition an O/S is: and in the case of embedded use
Furthermore, if I can write complete embedded applications in batch or short hand script files then I must be some kind of wizard. Most of the magic though is Forth and Tachyon itself which btw is not a compiler that resides on the PC drawing on its vast resources, but instead has the compiler, runtime library, debugger and O/S services residing on the Prop itself.
In the case of the 32k P1 especially, yes, it must be magic.
P.S. The fact that you can run "scripts" as well is a bonus, not the limitation.
as much as I would like to take credit for that excelent file, I cannot. I found it among the other gems in the tachyon neon thread.
Jim
ps, peter just posted to that thread, so it should be easy to find. iirc mjb gets the credit for the dictionary.