Author Topic: what language?  (Read 2820 times)

0 Members and 1 Guest are viewing this topic.

Offline zackshalacTopic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
what language?
« on: April 26, 2008, 10:59:12 PM »
I'm thinking about getting into building some kind of robot, just for fun, and i want to know what programming language to learn.  I'm thinking about learning either BASIC or C.  I know the basics of BASIC from my TI-83 calculator ;), and i took an on line tutorial for c++ and made some lame programs with it.  I'm sorta leaning to BASIC because that sounds easier to learn, but i want to know what limitations it has.

thanks

Offline Private Reid

  • Robot Overlord
  • ****
  • Posts: 276
  • Helpful? 0
  • I love apples ... Yum !!!
Re: what language?
« Reply #1 on: April 26, 2008, 11:58:15 PM »
i program with "c"

it's easier then "c++"

not sure about "BASIC" though
This Post was proudly donated by Sam.

Offline benji

  • Supreme Robot
  • *****
  • Posts: 832
  • Helpful? 0
Re: what language?
« Reply #2 on: April 27, 2008, 03:12:35 AM »
if you want to learn how the microcontrollers work start with a low level language,, like assembly, , then move to a higher level language
good ol' BeNNy

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots

Offline zackshalacTopic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
Re: what language?
« Reply #4 on: April 27, 2008, 07:20:38 PM »
thanks for the link to the c tutorial, i think that will be the language i pick, but where can i learn robotics specific programming, such as inputing from sensors and outputting to motors?  Is this something that will come in the microproccesor manual?

Offline Steve Joblin

  • Supreme Robot
  • *****
  • Posts: 405
  • Helpful? 2
Re: what language?
« Reply #5 on: April 27, 2008, 07:32:06 PM »
I would actually go the other way... I would start with BASIC, then move to more powerful and advanced laguages like C.  I would look at Parallax's BOEBot... the materials walk you through the basics of BASIC and the basics of robotics.

Offline JesseWelling

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 707
  • Helpful? 0
  • Only You Can Build A Robot!
Re: what language?
« Reply #6 on: April 27, 2008, 11:52:59 PM »
I would start with C. If you can think in C code you can think in any programing language, even if it's Object Oriented (because you should be making OO in C in any case...)

Well... any language except for LISP  :P

Offline lemontree

  • Jr. Member
  • **
  • Posts: 38
  • Helpful? 0
Re: what language?
« Reply #7 on: April 29, 2008, 08:37:08 AM »
I have recently looked at basic again after 25 years. I am surprised to find that it is still a very viable programming language. I downloaded Freebasic from www.sourceforge.net.  There is definitely a limit to the complexity of the programs you can write, but you can still do very much.  The keywords in basic are very intelligently selected, and put many modern programming languages to shame.  I started programming using basic and then assembly language on an 8 bit computer.

Offline Kitsune

  • Jr. Member
  • **
  • Posts: 18
  • Helpful? 0
Re: what language?
« Reply #8 on: June 23, 2008, 12:17:00 AM »
I find Java easy to use

Offline Cotowar

  • Full Member
  • ***
  • Posts: 50
  • Helpful? 0
  • Ubuntu for Humans
Re: what language?
« Reply #9 on: July 08, 2008, 10:28:08 PM »
I am no expert on building robots, and the hardware side of electronics is definitely my weakside, but as far as software and programming are concerned, I believe I can help you out.

You will probably want to start with BASIC, or better yet, VisualBASIC, so you can learn the more advanced concepts of programming with plain text. After that, you should be fine to learn C++ or Java. Most languages have the same concepts, its just the syntax that separates them. To be honest, I find Java easier to use than C++, but its really a matter of preference. I have noticed several minor shortcomings to all the languages I've learned so far, but overall I would say Java is probably the most capable and practical language to use.

If you wanted to be a badass, you could try doing it in FORTRAN. its similar in syntax to C, but is way older and a lot less capable. kind of fun if you're looking for an extra challenge.

Bottom line, I'd go with Java. Cheers.
--Cotowar--

Offline krich

  • Robot Overlord
  • ****
  • Posts: 165
  • Helpful? 0
Re: what language?
« Reply #10 on: July 09, 2008, 11:10:15 AM »
thanks for the link to the c tutorial, i think that will be the language i pick, but where can i learn robotics specific programming, such as inputing from sensors and outputting to motors?  Is this something that will come in the microproccesor manual?


Good choice.  Most of your C compilers allow you to do some inline assembly, so you get some exposure to that language as well, if you choose to pursue it.

You'll find a number of tutorials on the Internet that will go through some of the basics.  You haven't said what microprocessor you'll be using for your robot project, so I'll just tell you about Atmel's AVRs since that's what I use. 

First, there's a great website called Society of Robots  ;D , check out all of the tutorial sections and download the code examples.  There is much to be learned from simply looking at a code example.

Second, learn how sensors and motors are connected to your robot.  This will give you a better understanding of what you need to learn on the programming side.  Sensors typically use the ADC, so learn what that is.  Motors use digital outputs with PWM and require a motor driver circuit, so learn all about that.  If you don't understand the concepts, you have no chance of programming it successfully.

Finally, head over to AVR Freaks once you know what you want to do.  Take a look at the forums, and find the Tutorial forum.  In that forum, folks have posted comprehensive tutorials on a wide variety of topics.  Some are very basic, which is good for learning, others are way over my head.

Post here on SoR forums if you have any questions.  The folks here are a friendly bunch...they've endured my newbish questions quite well.

Good luck.
« Last Edit: July 09, 2008, 11:11:41 AM by krich »

 


Get Your Ad Here

data_list