Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 25th, 2005, 6:52 PM   #1
Mr.Robot
Newbie
 
Join Date: Jun 2005
Posts: 0
Rep Power: 0 Mr.Robot is on a distinguished road
Question programming a robot

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
Mr.Robot is offline   Reply With Quote
Old Jun 25th, 2005, 7:29 PM   #2
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
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.
Rory is offline   Reply With Quote
Old Jun 26th, 2005, 1:22 AM   #3
OpenLoop
Expert Programmer
 
OpenLoop's Avatar
 
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4 OpenLoop is on a distinguished road
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.
OpenLoop is offline   Reply With Quote
Old Jun 27th, 2005, 4:43 AM   #4
foxcity911
Programmer
 
Join Date: Jun 2005
Location: Queensland
Posts: 37
Rep Power: 0 foxcity911 is on a distinguished road
C!!!!!
foxcity911 is offline   Reply With Quote
Old Jun 27th, 2005, 8:17 AM   #5
Nuticulus
Programmer
 
Nuticulus's Avatar
 
Join Date: May 2005
Location: England
Posts: 61
Rep Power: 4 Nuticulus is on a distinguished road
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.
Nuticulus is offline   Reply With Quote
Old Jun 27th, 2005, 9:07 AM   #6
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,473
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
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."
Infinite Recursion is offline   Reply With Quote
Old Jun 27th, 2005, 9:08 AM   #7
skuinders
Hobbyist Programmer
 
skuinders's Avatar
 
Join Date: Jun 2005
Location: MA, US
Posts: 204
Rep Power: 4 skuinders is on a distinguished road
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
skuinders is offline   Reply With Quote
Old Jun 27th, 2005, 11:11 AM   #8
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
Quote:
Originally Posted by skuinders
C is the way to go. I've used the BASIC Stamp microcontroller before... not cool. BASIC is evil.
Not as evil as VISUAL BASIC
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old Jun 27th, 2005, 11:22 AM   #9
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Old Jun 27th, 2005, 11:42 AM   #10
skuinders
Hobbyist Programmer
 
skuinders's Avatar
 
Join Date: Jun 2005
Location: MA, US
Posts: 204
Rep Power: 4 skuinders is on a distinguished road
Quote:
Originally Posted by nnxion
Not as evil as VISUAL BASIC
indeed... of course we would have to stretch to call VB a programming language :p
__________________
"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
skuinders is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:49 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC