![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jun 2005
Posts: 0
Rep Power: 0
![]() |
I am a complete new comer to programming but have been building robots for years. The reason I am here is to ask what programming language would be best for simple "commands and responses" to different factors decided by external sensers.Preferably, I would like it to run on windows.
Just to be specific about what I need it to do: ex1. -3 steps forward -if encounter wall 90d clockwise, 2 step back ex2. -clockwise till view red, go in that direction Thanks for any help, Tristan B |
|
|
|
|
|
#2 |
|
Expert Programmer
|
Well first of all how are you intending to connect the robot to your computer?
There are plenty of commercial break-out box systems for connecting to circuits, as used in schools, which come prepackaged with their own software, though that can be a disadvantage - CASIO Basic is a horrible mutation of BASIC and LOGO. If you're seeking to wire up directly to a parallel port device, you'd need a language capable of working at a low hardware level like ASM or C. |
|
|
|
|
|
#3 |
|
Expert Programmer
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4
![]() |
what microcontroller are you using to controll the robot?
I've used Motorolla HC11 which has an Assembler and a C++ compiler so that you can create a program, compile it, download it to the controller, and run it in an endless loop. HC11 is a very powerfull controller however programming it can get a little complicated sometimes. |
|
|
|
|
|
#4 |
|
Programmer
Join Date: Jun 2005
Location: Queensland
Posts: 37
Rep Power: 0
![]() |
C!!!!!
|
|
|
|
|
|
#5 |
|
Programmer
Join Date: May 2005
Location: England
Posts: 61
Rep Power: 4
![]() |
I'd agree with rory here. If you can get a prepackaged system (normally intended for educational purposes) then it could make your simple programming a lot easier. Bear in mind how simple this gets -- I was taught about robots (the turtle!) and basic LOGO programming at primary school. I can't remember the specifics of the language now, but I remember it did the kind of things you describe.
If you don't have the option of such a commerical system, you'd probably want to use a microcontroller like the one OpenLoop mentioned. I have very little experience here, but I know there are quite a few controllers out there with compilers available. Learning C would probably be useful here -- all the ones I've seen have at least a C compiler. If you're controlling it directly via a parallel port, then you will want to use some low level language (my advice is C), but there are libraries available in other languages for controlling parallel ports. If you're on windows, I know there is part of the Windows API which allows you to control COM ports. Don't know about *nix, but I'm sure some googlging would help. My advice for this is to use C.
__________________
http://www.nuticulus.net/hackmysig/sig.PNG Give my site a chance, you know you want to ;-) Google will solve 99% of your problems. Including those with your sex life. Caution, may <strike>contain</strike> be nuts. |
|
|
|
|
|
#6 |
|
Programming Guru
![]() ![]() ![]() |
C, Assembly or both.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#7 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: MA, US
Posts: 204
Rep Power: 4
![]() |
C is the way to go. I've used the BASIC Stamp microcontroller before... not cool. BASIC is evil.
__________________
"A stupid man's report of what a clever man says can never be accurate, because he unconciously translates what he hears into something he can understand." - B. Russell http://web.bryant.edu/~srk2 |
|
|
|
|
|
#8 | |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
Quote:
![]()
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for." -- Socrates |
|
|
|
|
|
|
#9 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
IR might be worth thinking about. I wouldn't choose a controller until I had a high level design so I could get one with the appropriate amounts of the right kinds of on-board memory and I/O. Variations are pretty thick on the ground.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#10 | |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: MA, US
Posts: 204
Rep Power: 4
![]() |
Quote:
![]()
__________________
"A stupid man's report of what a clever man says can never be accurate, because he unconciously translates what he hears into something he can understand." - B. Russell http://web.bryant.edu/~srk2 |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|