Controlling Microcontroller
jonokonko
Posts: 3
in BASIC Stamp
Is their anyway possible to control the micro controller from a command window or txt file?
Comments
If you "upgrade" to the Propeller, I have a parser engine that allows me to control various projects from a terminal (live mode) or from a text file. The new Parallax badge uses this parser to allow the user to make changes from a terminal. The BadgeHacker program simplifies the process by typing/sending the commands for you.
StampPlot Pro is one example of a program that runs on a PC, communicates with a Basic Stamp, and can be controlled from a text file. Data can be transferred back and forth and plotted on the PC among other things. There's a more complex program for the Propeller called ViewPort that can be used as a debugger as well.
propbasic.blogspot.tw
With 'Visual Basic' and 'PBasic' you suddenly have to deal with learning two languages at the same time. That can be troublesome.
Using Visual Basic to talk with 'a few commands' that you create on the BS2 is possible and has been done many times. But sooner or later, you will begin to desire the additional utility and power of a microcontroller that has an interpretted language on-board. It just gets tedious to create more serial commands in PBasic and you may begin to run out of space.
Go ahead and explore the Visual Basic/PBasic solution if you want, but keep in mind that using a terminal application and PBasic might be clearer. And then you can move to a terminal application as PropBasic to gain more power.
The BS2 is a compile, load, and run form of Basic. You have to realize that is have 32 bytes of RAM, while the Propeller has 32Kbytes of RAM (a thousand times more).
The BS2 is better at feeding data to Visual Basic that receiving data from Visual Basic. In that mode, you can gets some nice graphic display of data in near real-time.
No matter how much you desire, you can only send 32 bytes of 'data' to the BS2 at one go. But the Propeller is capable of accepting much more and processing it more quickly.
I admit I am biased as I think that Visual Basic would be a distraction and a Terminal program would really demonstrate what you can and cannot do with the BS2 in serial mode.
Just two character commands generates 26x26 letter combinations for 676 commands. And that isn't including numbers, upper and lower case, or special characters. But it certain does give your more space for programs and runs fasters through a table.