Go Down

Topic: How did you learn programming the Arduino? (Read 8610 times) previous topic - next topic

Vortexnl

I'm planning on buying an arduino in the holidays! I can't wait!
But how did you people learn the language?

Im buying the starter kit that includes the "Getting started with Arduino" book.

Tell me about your experiences!  ;)

PS:  How would I be able to make a seven-segment display that increments a number from 0 to 9?
I was thinking. if you would make an internal timer that increases every second, with an delay that is. will your other code after the delay execute as well?

I mean, lets say you have some IF statements.
If time ==1 {
A=0, B=1,C=1 etc etc.
}
These statements must be able to run continuously. although will they be able to do this when the time is delaying?

Thanks in advance!

estranged

I would go to http://arduino.cc/en/Tutorial/HomePage and start with the Blink example, and work your way down.  Be sure you understand why everything happens before heading on to the next one.

BRuTuS

If you have a library local to you, check for a book entitled "Sams Teach yourself C in 24 hours"

It's not Arduino specific, but they are great books to get started in programming as a whole.

As mentioned, the tutorials on here are excellent as well.  

Mike Mc

There are plenty of tutorials around the interwebnet. Such as the Ladyada tutorials or Tom Igoes website.

Any book on C programming will also help you.


zageek

The first thing that I noticed when I saw Arduino code was that its C.

I would suggest like everyone else is saying, go and learn the basics of C while you are waiting for the board.

Beside being useful for working with Arduino learning C will help you with PHP, Java, Javascript, not to mention give you a foundation to go one C++ or C#.

C was one of the first languages I learned after BASIC. So far investing in learning C has been very good, because it has allowed me to move to so many other langauges. You can see how C has has inspired so many other programming and scripting languages. I can even see how python was inspired by C.

If you can get your hand on a book called C programming by Kerningham and Ritchie the inventors of C, you will find more than you need. Otherwise if you are very new to programming just learn the basic sytax of C which is all you need to get started with Arduino and build on that as you go along.
South African Arduino User Group

http://arduino.za.net

AlphaBeta

I've used and continue to use Arduino in order to get a deeper understanding of C++.

It is brilliant to explore abstract programming subjects.
Get that led to blink no matter what: pointers, arrays, protothreads, finite state machines, multiplex/demultiplex, polymorphism, templates, linked lists... you name it, Arduino does it ;)


A great tool for learning as well as creating!

westfw

OTOH, I would say that part of the idea of Arduino is that you can accomplish interesting things without really having to learn programming first, similar to the way you can draw with crayons without an art class or saw wood without carpentry training...

rFree

#7
Jul 05, 2009, 04:20 am Last Edit: Jul 05, 2009, 04:21 am by rFree Reason: 1
It's not C, "a subset of C++" strikes me as the best description I've heard yet.

It's an important distinction, as say pasting functions from my .c files into a .pde file will result in error.

You can incorporate .c files in your arduino project though :)

2GMario

to me, its not to far off from php, if you happen to be a web developer like me

then again, php is based on C, so it should "look" like it

as for your programming question, if i understand it right, you want only the if statement to run and not the code after it

any if statements after the one your concerned about, if they match the condition, would execute normally

you may wanna use a case statement as it would be a little more efficient in my opinion

as i'm trying to come to grips with the mechanical side of arduino, the programming side is the same. you have this language. it's capable of doing all kinds of stuff, and theres usually many ways of doing something. you need to figure out what you want to do and how you want to do it. you can use an if statement; a case statement; etc... your experience with the language and how much time you want to invest will usually dictate what you will do, code side (and probably mechanical side as well)

my 2 cents anyways.

-Mario

Udo Klein

Actually the language is C++. The IDE tries to hide this but it actually does a poor job in doing so. Even though it seems nice it implies that you never get proper line numbers from the compiler. Especially the IDE can not show you which lines correspond with which bug. And of course you can not control the prototypes and hence you are pretty much bound to predefined types in the function interfaces. Unless of course you understand more of C than you are expected to.
Check out my experiments http://blog.blinkenlight.net

Zacattack21

i learned a lot from searching to internet........ but i found a started kit thing online that printed out and that was very helpfull to me

Mike Mc

Here you go - http://www.earthshinedesign.co.uk/ASKManual/

jezuz

I wouldn't say php... php always strikes me as similar to xml (but I use both for only basic things, and usually only read the code, not write it myself), but for one reason or another, arduino-code reminds me of my first language - actionscript.

Go Up