Using a custom GUI to control the Propeller in real-time
archerbrad700
Posts: 18
Hello,
I am considering using the Propeller in a new project but I need some info or general direction before I continue. I am wondering how I could use a custom GUI (such as a spin box value) as a real-time input to the Spin program?
First, is it possible?
Second, if it is does anyone have any good references as to how this could be done?
I have worked with the Stamp before but this is my first Propeller project and it is going to be rather involved. Any help is greatly appreciated.
I am considering using the Propeller in a new project but I need some info or general direction before I continue. I am wondering how I could use a custom GUI (such as a spin box value) as a real-time input to the Spin program?
First, is it possible?
Second, if it is does anyone have any good references as to how this could be done?
I have worked with the Stamp before but this is my first Propeller project and it is going to be rather involved. Any help is greatly appreciated.
Comments
Propforth is a forth command line that allows one to add source code definitions on the fly and execute functions interactively. It does everything you (appear) to want, and more; however it is necessarily less like spin.
You could also use a server (such as the Propeller based Spinneret) attached to the Propeller and control it over ethernet and an internet web page.
As you can se by the response, we dont know precisely what you are wanting to do. However, it will be much easier with the prop once you understand spin (or forth, propbasic, c, etc). There is an app note for a gui on the prop (see http://www.parallaxsemiconductor.com/ ). There are a number of os for the prop, mostly using microSD cards (see my signature for some links).
Dr_Acula had done some amazing things with guis too, so check out some of his threads.
And of course, we have CPM running under ZiCog (a Z80 emulator) as well, but that is text based.
Thinking of the 'history of computers' we have emulated 1970s computers and quite a number from the 1980s. These are text based or 'chunky graphics'. The app note Cluso mentions above looks very similar to QuickBasic which was from the early 1990s, which is text based but uses characters like box corners to build boxes.
What we don't have quite yet are text boxes that can display any arbitrary font, including fonts where the letters are all different widths. It is coming and the prop is certainly capable of displaying such graphics but the code hasn't been written yet. (The attached photo shows the prop can display things, but those text boxes don't work as yet. The button does and the check boxes almost do).
But in many cases the GUI described in that app note Cluso mentioned will be more than enough. You can click on things with a mouse, move things, type things.
Here's what I'm trying to do:
I am going to use the Prop to control a laser pointer in two axis. The motors are stepper motors with drivers that only require a pulse from the microcontroller to step once. Another pin will control direction with a high or low.
That part is pretty straight forward but it gets more involved because I need the ability to save points in a Cartesian plane and go back to those points (this involves counting steps/pulses). A series of points will be saved into a Spin program that can be controlled by the user. There will multiple programs to choose from.
Most importantly it needs to have a very user-friendly (read: user has next to no computer experience) interface. That is why I want a GUI with the same look and feel as XP preferably. I have already begun creating the GUI in QT by Nokia (C++ based), but my experience with it is limited. Actually, my computer science experience is pretty limited too.
I think JonnyMac was the closest to answering my question how I envisioned it being answered. Can anyone elaborate or point me to a source that will clarify "create a protocol that transmits the item that changed and the new value" and "serial object to take care of the basic comms and, perhaps, a monitor cog that parses messages and acts accordingly?"
Thanks you all for your time.
U-Tube
http://www.youtube.com/watch?v=07AI2uXGZ-k&feature=player_embedded
Source
http://www.agaverobotics.com/services/dotnet/Kinematics/2DOFKinematics.zip
This simply means sit down with pencil and paper and figure it out. A protocol is an established interface, commands that the Propeller and PC applications use to communicate to each other. The protocol might look something like !C X25 Y25 for X Y coordinate (25,25). The PC creates the command and fires it via over serial. The prop picks up the command and executes.
How and what is up to you. If you get stuck, ask a question.
(I thought you wanted your Prop to directly display a GUI on a VGA monitor...)
In that case, I think the easiest way would be to use "Visual Basic".
I think you can download a free version from Microsoft.
Personally, I'd do it VC++, but maybe somebody could make one up in Visual Basic...
I'm big on requirements, as in "If you can clear state what you want, you have a better chance of getting it". If you want, we can help you sort out your requirements etc.
In a nutshell: First clarify your highest level, general requirements; then break these into "systems that can provide these services; then beak these into functions each can provide; then decide how you can test that they are present and working THEN do the coding last. This makes life easier, is faster in the long (and short) run; and makes it harder to have bugs.
Try not to limit your options at this point by making design decisions before you have defined what you really want to do, we often end up painting ourselves into a corner.
Mike G-Cool robot! A SCARA type robot is on my future list of things to make, but that's still a ways off. I need to do more learnin'. What program do I open your .cs files in?
Prof-Braino: Thanks for the advice. I actually do have some pretty clear and thorough requirements for this project, unfortunately I am unable to share them all because this project is going to be proposed to my employer for use in our facility. I don't want to breech any confidentiality agreements.
Rayman: Thanks for the recommendations. I've been using Qt for a while and am fairly comfortable with it for a beginner to GUI development. It seems to be pretty feature-full, capable, and well-documented and supported so I think I'll stick with it for now.
I'm going to get as far as I can and if I get stuck I'll post again. Thanks.
I think ANO18 has a VB example for the Quickstart......although just now I had trouble locating the app notes.
Jeff T.