Creating a GUI?
wickle
Posts: 6
Hey guys, I recently purchased a BOE-BOT, with the QTI line followers. And I have been making a line follower robot with a few extra commands, i would like to make a GUI that I can use on my computer to interface with the boebot, rather then just the debugger on the basic stamp program. What program can I use to create a GUI for the basic stamp?
Comments
Visual Basic is popular.
It just depends on your level of comfort and which languages you know....
My brains curiosity has had me dabble in small bits of different types of languages before, mostly C, and a bit of java. I have created some very basic GUI's with java where I created a few buttons and gave them some basic functions and outputting a very basic arithmetic function of sorts.
With what I know, you create the buttons and layout of the gui then add the functionality to the button and other things to be used by the user. Am I correct in saying that?
Also, the BoE with the basic stamp 2 module would I be able to use something like netbeans? Would it be able to compile the basic stamp code?
GUI's typically follow the Model-View-Controller framework, and that's how Java Swing is built. That's essentially what you described (adding functionality to a button).
so its not possible to create a GUI for the boebot?
http://www.parallax.com/tabid/458/Default.aspx
It probably would have been a good idea to describe more in detail what I am trying to do.. sorry about that let me go in to a little more detail.
So I have my boebot programed and working to navagate as a linefollower through my hallway, and depending on a variable in the program its self it goes in to a certain room (ex. variable set to 1, goes in to the first room, set to 2 goes in to the second room.. etc) now each time i want to run the boe bot i have to change the value in the program its self.
What i would like to do is create a very basic GUI window with a few buttons, and say have one button send the value of 1 to the variable and run the program with that, a second button send the value to 2 to the variable and progress with that.
I hope that was enough of a description for you guys to get a little more of a feel for what im trying to do, I was thinking of using VB to create the GUI window from what I have been reading from you guys and my researching on the internet. But Im sure i cant just copy over my code from basicstamp over to VB, and expect it to understand it. What would I need to do to get my code from basic stamp to work in VB?
What you need is a GUI on the PC, written in VB or something similar. The selected value (1, 2, 3, ...) gets transmitted to the BoeBot as a byte of data whenever the BoeBot asks for it (by transmitting some character you've chosen). You have to modify your BoeBot program to send a character you've chosen to the PC whenever it needs to know where to go next and then the BoeBot waits for a response from the PC with the value of the new destination.
In other words, the BoeBot program, at the point where it would normally check the variable would do something like:
DEBUG "?" ' Send a question mark followed by a carriage return
DEBUGIN DEC dest ' Wait for a number followed by a carriage return, store in variable dest
The VB program would have to look for a question mark followed by a carriage return. Once found, it would transmit the number most recently chosen as a sequence of digits followed by a carriage return
Sort of, I don't want an onboard LCD I just want a simple interface on the pc. I found this link just now http://www.andrew.cmu.edu/user/schapiro/documents/VB2bb.pdf
Looks exactly what I'm trying to do create a small GUI window to send commands to the boe bot. I have not yet read the link, just found it but about to head to work I hate working grave yard
Let me know what you guys think of that link
In later days when was/am using python more often, as was mentioned earlier, I/we used pyserial, which is quite a reasonable option.
Anyway, from what I've read of that doc (not much), it seems fairly decent, and I hope you all the best!
Jeff T.