Society of Robots - Robot Forum

Software => Software => Topic started by: Improviser on November 01, 2010, 09:17:30 AM

Title: can't we use visual basic?
Post by: Improviser on November 01, 2010, 09:17:30 AM
Can't we use visual basic to program the robot instead of C ?
I can only program in visual basic.
Title: Re: can't we use visual basic?
Post by: galannthegreat on November 01, 2010, 10:35:49 AM
In my experience C is the choice language for programming embedded systems. For the high level language that it is it provides a lot of low level control. So I'd recommend learning C as it will be very valuable in the future.
Title: Re: can't we use visual basic?
Post by: waltr on November 01, 2010, 01:14:30 PM
Isn't visual basic only used within a MicroSoft OS?
Therefore if you put a PC motherboard running Windows on your robot then you could program it in VB.

The development tools for the small microcontrollers used in hobby robots don't use VB. Assembler and C are the commonly found languages and sometimes a variant of BASIC.

Title: Re: can't we use visual basic?
Post by: Improviser on November 02, 2010, 09:24:31 AM
Thank you very much. Now I understood the flaw in my understanding.
Title: Re: can't we use visual basic?
Post by: GearMotion on November 05, 2010, 08:43:41 AM
Thank you very much. Now I understood the flaw in my understanding.

You could tether your robot (or use radio modules) and use RobotBASIC. That is what "Enhancing the Pololu 3Pi with RobotBASIC" does:

http://www.amazon.com/Enhancing-Pololu-RobotBASIC-John-Blankenship/dp/1438276052/ref=sr_1_7?ie=UTF8&qid=1288968103&sr=8-7 (http://www.amazon.com/Enhancing-Pololu-RobotBASIC-John-Blankenship/dp/1438276052/ref=sr_1_7?ie=UTF8&qid=1288968103&sr=8-7)
Title: Re: can't we use visual basic?
Post by: azy on November 14, 2010, 02:30:29 AM
I'm looking for a hardware setup i can control with some dialect of basic. In a nutshell  2 tilt pan servos for my camera.

There is lots of info about all the hardware out there, but I'm having a hard time figuring out what hardware to get as i need to it  control using my own code. Which is an essential part of what I'm trying to do.

Yeah I know c is the language, fine if you've been using it for years but a virtual non starter if you just want to get on with your build.

Anyone here controlling their hardware with Basic ?
Title: Re: can't we use visual basic?
Post by: blackbeard on November 14, 2010, 09:09:36 AM
you could get a basic stamp 2. it's uber expensive but it's pretty much the easiest micro you can use though it's far from the best. a BS2+ boe board will run you about $120 but you can build your own carrier board for cheeper since all it really is is a serial port and some capacitors if i'm not mistaken which would lower your cost to about $50. people will probably hate on me for recomending the basic stamp 2 but the reality is that it's an amazing platform to start off on if all you know is basic however eventually you will want to branch off into cheeper micros especially if you intend to build more perminant devices where you don't have the luxury of ripping out the micro when you want to build something else.
Title: Re: can't we use visual basic?
Post by: azy on November 14, 2010, 01:24:47 PM
thanks for the info.

Though i think my main problem is that 90% of the gear is designed that you code a chip or write some scripts in the bundled software to get your bots to do certain things and perhaps react in a certain way. If a = 1 and b = 2 then do x,y,z (meaning your robots can only do a dozen or so things, albeit in clever ways )  Thats not what im after. Though it would be very handy to write scripts or small progs in basic that can be uploaded to the chip. I still need to trigger when or how the scripts or program store on the chip run.



Option A
Now if i could send a simple command , eg "code 16" from my own basic program that would trigger a script to run that i had written earlier (in the bundled software that came with the board/chip) THAT would be really usefull. I'm sure this has been done  before, i just need to find out how and what with.

Ill proly have to add some code to the bundled software that comes with the hardware  so i can break out and talk to my brain software, and vice verse break out of my brain software so it can talk to the bundled software and pass it some paramaters

[mybrainsoftware.exe] output to [mytranslator]  simple output to {bundledsoftware} output to port >board >servo = servo move
Q can that be done with the stamp kit ?




Option B

get my brainsoftware to send a simple command directly to some port that would trigger a particular script  i had pre programmed , the chip on the board then moves the servo so so

[mybrainsoftware.exe] output to [mytranslator]  simple output to port >board >servo = servo move
Q can that be done with the stamp kit ?





sorry for the 20 questions in advance, This is all new to me.  (im using windows XP btw) .The brainsoftware is some half a million ! lines of code so rewriting it and trying to squeeze it into some bundled software tied to a limited array of hardware options is a non event.  It is designed to stand remote, take input from an infinate array of sensors and output to an infinite number of hardware devices , which are bolted on as required. The brainsoftware is more like an operating system than any traditional program.

Title: Re: can't we use visual basic?
Post by: blackbeard on November 16, 2010, 10:02:01 AM
i don't really understand what you're getting at. are you saying you want to write a program in visual basic and then send signals to a micro in order to do that? the answer is yes. you do however need to write a program for the BS2, arduino or whatever other micro you intend to use. you would essentially be using the micro like an i/o board of sorts and it's a very common practice. it would also let you use the visual aspect of your program. if you're feeling a bit adventurous then i know there are standalone PIC microcontrolers that use basic and i've seen this project on youtube and hackaday  where someone used a router connected to an rc car through a PIC which he controlled through wifi using a VB program. although most of your programing would likely be done on the microcontroler side you would still be able to use the visual features of visual basic.

oh on a side note if you have a spare netbook then programming in VB is not only possible but very easy however you still need some sort of microcontroler.
Title: Re: can't we use visual basic?
Post by: airuno2l on November 16, 2010, 06:00:07 PM
I like using the microcontroller as a middle man, and do all the heavy programming in Matlab, talking back and forth with serial. But once I get my robot ready, I'm going to need to change something. Maybe use bluetooth
Title: Re: can't we use visual basic?
Post by: Tommy on November 16, 2010, 08:11:47 PM
Quote
oh on a side note if you have a spare netbook then programming in VB is not only possible but very easy

http://www.phidgets.com/products.php?category=11&product_id=1061 (http://www.phidgets.com/products.php?category=11&product_id=1061)

They give you example codes in VB6

Tommy