Code Book

hello, i am a super noob at this, i have already built 2 arduino clones and implied code in them to run on LED shields...

my question is- Is there a book or a pdf or anything, that can teach me the basics and indepth code that the arduino uses in its program... i want this to use my OWN codes when programming an LED shield. or any future project.

i have read that the Arduino code is based off of C. is this right? if it is can i just buy a book on programming C?

A book on C and/or C++ programming is a great start. The language is almost identical. There are also several free C/C++ compilers you can run on Windows to practice.

awesome! thanks,

so all of the code the arduino reads is all C?

also where can i find a list of terms the arduino would recognize? (sorry if this is a stupid question)

i want to learn how to program so im hoping that starting in the arduino is a good choice since they have awesome projects out there to learn from...

Well, its C/C++, but the Arduino environment makes some changes. It uses the gcc compiler, which is a very good C/C++ compiler. But, you don’t have things like stream IO, because you don;t have a console or a file system on an Arduino. There are other examples also.

If you want to learn to program on Windows in general, the arduino might not be your best bet. You can download for free very good C/C++ compilers like Open Watcom and Visual C++ Express. You can also program in Java for free, on pretty much any operating system. If you want to program micro controllers specifficially, then I guess Arduino is a good choice. But I would still start with a simpler environment.

also where can i find a list of terms the arduino would recognize?

Here's a start:

http://arduino.cc/en/Reference/HomePage

I’ve never heard of “stream IO”. That’s probably why I can’t get to grips with this obtuse concept of programming.

http://www.cplusplus.com/reference/iostream/

Also a nice reader is - http://www.earthshineelectronics.com/files/ASKManualRev4.pdf

Hi there! I'm a beginner too, and I found this one when I was getting to know Arduino, try this: http://code.google.com/p/arduino/source/browse/trunk/core/wiring.c?r=22

[quote author=Ian Tindale link=topic=52068.msg371444#msg371444 date=1297596211] I’ve never heard of “stream IO”. That’s probably why I can’t get to grips with this obtuse concept of programming. [/quote]

What's really great about computer programming is that anyone can learn it pretty much for free, and then even get a job doing it for good money. All you need is a computer and an Internet connection. There are free compilers, free debuggers, free languages, free operating systems, and plenty of free reading material. Plus forumns where kind people will help you for free. Just start with Google and something like "learn to program in C/C++," or Java, or whatever. Put the time in, and you'll learn.

I didn't recomend a specific site because others here have, and I don't know which is best for you. I started learning (you never stop) years ago and have bookshelves full of books. Start with the basics, and when you get past that, look for books by Scott Meyers, Bruce Eckel and many others. You'll learn quick.

I’ll take your advice. When I fully comprehend that “stream IO” thing, I’ll move on to the next step.

wow, thanks for the input and help...and i will take your advice of learning it in windows first then ill move along to microcontrollers for a fun sideproject...very useful info! thanks a ton!

So, I would just like to say: awesome. Many newer people that start on Arduino simply do Copy Pasta to make their programs work. In fact, that is how I was introduced to Arduino. "Hey Johnny! Look what I made." Me: "Oh awesome that is a pretty cool LCD screen with text scrolling." Him: "Yup, and to make it say what ever you want, you just edit this line." After I saw the code I knew he didn't program it. He simply bought the Arduino, copied and pasted, and looked at the drawing to make an LCD scroller. He knew nothing of programming, which is okay, but its just the fact that he said he did everything. I just wanted to say kudos to you for having the want or motivation to learn a language.

Myself: I have had a ton of classes / side experience so I am great with PHP/MySQL/Java/C/C++/Python... The only new thing was that now I could control something in real life, which is amazing.

Good luck!!!

Thanks man!

i have been interested in technology ever since i started to open my toys and finding out how they work…now i want to be able to design, make and program the toys to work LOL

im 19 and hopefully my brain is still fresh to learn new languages! lol

ive also been rather confused of where to start in school for programming…any suggestions?

is C++ a good programming language? or should i go to like html or java?

i want to get into the making of a program and somewhat into robotics.

Well, I was in FIRST Robotics... (I am 20). With our robots that we made, C++ and Java could be used. Personally, I like Java just because there are some things about it that make it a little easier than learning C++. However, C++ is an amazing programming language as well. The big difference is that C++ is used for things like Windows and Java is cross-platform capable. If you want to learn Java as well, you are able to do so without fear of not being able to apply what you have learned to C++ and vice versa. Both a very similar. Once you learn one, you know about 70% of the other language. With Arduino, its in C/C++. I would say that it would be a good start.

I would strongly suggest looking at the language called FORTH before you look at those others.

is C++ a good programming language? or should i go to like html or java?

HTML is any kind of programming language.

AWOL:

is C++ a good programming language? or should i go to like html or java?

HTML is [u]any[/u] kind of programming language.

oh alright. i thought html was a a web language.

but anywho, i will very much look into java and C++ now. i will see what my nearest college has to offer lol

thanks again everyone for your help. :)

Oops, should've been "isn't any kind"

HTML isn’t a programming language, really. It’s a markup language.

You can’t really say do this, then that. And if you can’t do that, do the other instead. And when you’ve done that as many times as this thing over there has done something, come back and start again. That’s what programming languages do.

HTML describes, contains and separates content, and then a user agent (like a browser) will do something to that content, because now it knows something about that content, because you marked it up.