2

Author Topic: what would be the best language to learn?  (Read 1994 times)

0 Members and 1 Guest are viewing this topic.

Offline SmAsHTopic starter

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
what would be the best language to learn?
« on: February 15, 2009, 01:15:02 PM »
well as im doing electronics this year my teacher said he would he me the best he can with learning a language. what would be the best one if i only expect to use the roboduino at this stage? c++?
and also is what i see in the tuorials actual code e.g
if sensor inputs are the same
the robot will go straight?
and one more thing, does anyone know of a place in australia or a place that ships cheaply to australia that sells roboduinos? or is it just from curious inentor?
thanks in advance.
Howdy

Offline DemonDomen

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 0
Re: what would be the best language to learn?
« Reply #1 on: February 15, 2009, 02:24:06 PM »
Depends on the purpose of the program. If you're making something with arduinos, you should learn C.

You can use http://arduino.cc/en/Tutorial/HomePage for examples.

The code in the tutorials usually isn't real code, it's pseudocode. Real C code would look like this:

Code: [Select]
if(sensor_left == sensor_right){
    left_wheel(1);
    right_wheel(1);
}

Offline Resilient

  • Full Member
  • ***
  • Posts: 111
  • Helpful? 4
Re: what would be the best language to learn?
« Reply #2 on: February 15, 2009, 05:51:57 PM »
If you can only learn one and need it for this then C is really the only option.

If you have time to learn two I might consider learning Python first because its syntax is much simpler.  You will pick up programming concepts much faster.  I would especially consider learning Python first if you are doing it more independently.  I know i would have had a hard time learning C without a classroom to learn it in.

Offline SmAsHTopic starter

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: what would be the best language to learn?
« Reply #3 on: February 15, 2009, 11:11:02 PM »
hmm well i will take a look at python and c.
but does anyone have an answer to my other questions? especially the roboduino one?
Howdy

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
Re: what would be the best language to learn?
« Reply #4 on: February 15, 2009, 11:35:07 PM »
Learn the arduino language, based off of C. Tutorials are on the arduino web site.

Offline SmAsHTopic starter

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: what would be the best language to learn?
« Reply #5 on: February 16, 2009, 01:51:24 AM »
will that surfise for other microcontrollers too? guess for now ill have a go at c because ill probably only be using the roboduino, speaking of that i might get one for my birthday in about a month if i can find a distributor in australia. if not the total cost of shipping from us and the board cost about $100au :( does anyone know of a place in aus that sells them?
Howdy

Offline cosminprund

  • Robot Overlord
  • ****
  • Posts: 284
  • Helpful? 8
Re: what would be the best language to learn?
« Reply #6 on: February 16, 2009, 02:04:44 AM »
If shipping for the Roboduino is too much why not make your own Arduino? They've got everything you need to make your own single-sided PCB; You'd just need to change the female headers to male headers and add two more rows of headers to the board. It will not be as pretty as the Roboduino but would work.

About learning C, you're worrying too much. The tough part is not learning any particular language, the tough part is learning programming - and you can do that with virtually any programming language. The next tough part is learning what your platform can do (your platform is the MCU). Once you've learned one language and managed to get a good grip on what your MCU can do you'd have very little problem learning the second language, if it's even necessary. This is because all languages share an commen set of concepts and actually share an significant amount of common syntax! That is unless you want to learn somethink like the Brainfuck language (google that).

Offline SmAsHTopic starter

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: what would be the best language to learn?
« Reply #7 on: February 17, 2009, 03:13:11 AM »
lol ok thanks cosminprund, does anyone know of a place i can get the boards etching 'plan' or just buy the pcb?
i am considering forking over the $100 for the roboduino although i will be sad it will help me immensely. :(
and does that code that DemonDomen posted mean that if both sensors read the same go forward?
Howdy

Offline cosminprund

  • Robot Overlord
  • ****
  • Posts: 284
  • Helpful? 8
Re: what would be the best language to learn?
« Reply #8 on: February 17, 2009, 04:21:41 AM »
What would help you immensely, the $100 or the Roboduino? And what's an "etching plan"?
If you're short on money just buy the ready made and tested Roboduino. If you want to do it all yourself (including etching) you'll end up paying more for sure! I'm considering building an Roboduino myself (because I want to support it with my SoR Scope toy), but here are my reasons. Compare my reasoning to yours:

- I need an Roboduino because I want it supported in my SoR Scope program
- I don't want to buy an Roboduino: I'd end up having no fun at all with it, I'm sure I'd have no problem programming it and it would be too easy. Building it would be fun because it would give me a challenge. Programming it would be less interesting since I've allready got an number of other Atmega's programmed, including the Axon, the $50 and my Atmega324-based "$50".
- I have an hardware (ISP) programmer so I don't need an pre-programmed Atmega for the Roboduino.
- I have most of the parts, including the Atmega168, crystal, capacitors, resistors - I just need to buy the USB-to-TTL converter chip.
- I've only soldered SMD parts for fun and testing, never actually got them to work in a real project. The USB-to-TTL converter is SMD, so I'll have fun with that. And yes, I'll order 5 chips to start with, just in case I'll ruin the chip while soldering.
- I've etched my own boards before.
- I've just bought some double-sided blank pcb's and I want to test them with something, anything! I've only done single-sided PCB's so far.
- I've got some Press-n-Peel Blue transfer film and I want to play with it.
- I bought the vertical stand for my Dremel and a small caller to hold by PCB drilling bit and I haven't got the chance to test them.

Really, it's an paradox, but it's true. Building it yourself really is going to cost your more - unless you allready have most of the prerequisites. If you absolutely want to build something yourself build the $50 board: that board is designed to be made onto a perf-board (so no etching), uses common parts (you'll find them in Australia no problem) and there's a lot of support for building that on the forums.

Offline SmAsHTopic starter

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: what would be the best language to learn?
« Reply #9 on: February 17, 2009, 04:49:53 AM »
yea i think ill get the roboduino ;D .my electronics teacher seems quite interested in it and wants to see one, so i think ill definately get one. im getting $200 for my birthday in a few weeks and im most likely going to look for a job so that should help a fair bit. thanks you guys ;D
Howdy

 


Get Your Ad Here