I wanna start learning this stuff

So, around March 2016 I will have to turn in a huge project at school, it carries the same weight as the past 2 years of Computer Science. (this is in high school, so the past two years means a pretty basic introduction to C#, Classes, Lists, Stacks/Queues and Binary Trees)

Sooo anyways... I wanna put in some effort and do something cool. A while back I saw something online that seemed like something that would be both fun, interesting and impressive (when being recruited to the army they also look at this kind of stuff and doing something impressive goes a long way).

So, what I saw online is building a keyboard (physically, with a teensy microcontroller) and then programming the firmware for the thing. I read online that this kind of stuff is done with a Teensy, rather than an Arduino, but I figured I should start with doing simple stuff and practicing and learn how this kind of stuff works.

Another thing is the programming language, from reading around I've learned that this kind of stuff is done with C or C++. I asked a bit or Reddit and Stackoverflow and I was told that it would be better for me to learn C for this kind of low-level programming. So I read a bit more, looking for a text book or video series but I couldn't really find anything concrete except the K&R book. I'm not really sure about learning from that because it might be a bit out dated (it was written almost 30 years ago, after all).

So if anyone could help me out with finding a good text book or website or video channel to learn C from, or if I should actually be learning C++, or if you just want to explain a little bit about how I would go about undertaking such a project I would be extremely thankful!

BTW this is the post that got me interested in this kind of stuff in the first place

My advice would be to get an Arduino Uno, download the IDE and dive into the examples. The Arduino IDE uses C++ and it sounds like you would soon pick it up.

Others will be along with advice on books etc, but there is nothing like getting you hands dirty. Apart from anything else you will want to try what you are reading about.

I don't have any advice about books - probably because C/C++ is the almost the last language I would use if I had any choice. I have one book "beginning Visual C++ 6 by Ivor Horton" which I got in a charity shop for £1.50. It's crap - at least for my purposes - but for the moment it fills my bookshelf nicely.

However the Arduino is a great system for learning by doing and the Arduino comes with a large collection of useful example programs.

If you want to have a quick look at some longer, but still simple, examples these links may be useful
several things at a time
[planning and implementing a program](http://Planning and Implementing an Arduino Program - Arduino Forum)
communication using Python

...R

UKHeliBob:
My advice would be to get an Arduino Uno, download the IDE and dive into the examples. The Arduino IDE uses C++ and it sounds like you would soon pick it up.

Others will be along with advice on books etc, but there is nothing like getting you hands dirty. Apart from anything else you will want to try what you are reading about.

Yeah I will be getting an Arduino in a couple weeks (don't live in the US of A or EU so I gotta wait a while before getting stuff). But I figured I might as well start learning the language until then.

So you say that the Arduino uses C++, but how about the Teensy? I also read in a bunch of places (also was told by a whole lot of people on Stackoverflow) that for this type of programming it would be better to use C and no C++.

Robin2:
C/C++ is the almost the last language I would use if I had any choice.

Really? Most places I've read online deem C and C++ to be the better languages for low level programming.

If you have a book of C that is 30 years old, it is not outdated. My experience learning C 20 years ago was on now 30 year old text. Any decent public library should have some books on C. The content has not changed. Use arduino example code and read a book.
I don't mean to pick on you. What you described was only worth a two-semester sequence on c# with 3-4 credit each semester. That is not 2 years of comp-sci. If you have a whole year of csci ahead of you with 2 to 3 hundred course numbers, get raspberry pi instead. Arduino can be cool, but it won't have enough memory for what you want to do a semester from now. The keyboard project is pretty cool but shows no csci skills. It is mainly electrical and mechanical skills. Maybe army recruiters will take it.

Arduino uses C/C++.

liudr:
I don't mean to pick on you. What you described was only worth a two-semester sequence on c# with 3-4 credit each semester. That is not 2 years of comp-sci. If you have a whole year of csci ahead of you with 2 to 3 hundred course numbers, get raspberry pi instead. Arduino can be cool, but it won't have enough memory for what you want to do a semester from now.

It may be two semesters in a university, but I'm still in high school. What I was trying to say is that progress in subject matter is slow, not that I'm an expert or anything, quite the opposite actually.

Regarding the "big" project; please remember that this what I'm talking about is still high school. The level expected isn't anything serious, so anything "out of the box" like dealing with hardware, or C/C++ (which we haven't learned in school) is held in high regard.

Also, forget what I said about the army, it's not really relevant in any way.

Oh, and thanks for the clarification about the book. I guess I should get started with "The C Programming Language' by K&R, then.

Also, could you explain what you mean by saying Arduino uses C/C++? From what I've read C++ is based on C, and includes C, but it's also quite different.

Would it be better for me to learn C or C++ for a project such as this?

liudr:
Any decent public library should have some books on C.

Not in the UK.
But there is no shortage of "internet for seniors"

...R

Robin2:
Not in the UK.
But there is no shortage of "internet for seniors"

...R

Every library in the UK has access to the entire contents of the British Library so whilst it is true that not every library will have books on C on their shelves they can certainly obtain them for you.

If you can write C# you can read enough C/C++ to work through the example sketches that come with the IDE. You don't need an arduino to use the IDE, so download it and look through those examples. You can write and compile your own sketches too, although of course you would need an arduino to test them.

No harm getting some books or doing some on-line tutorials, but you may find that you already know enough to make decent progress without them.

By saying C/C++, I mean the set of language that includes both C and C++. Since you know C# already, you are ok with object-oriented programming, i.e. the C++. The old school C is a very similar language except that many functions used in C are no longer used in C++. You will need a book on C to learn the syntax. I thought you are first year in college or something. Forget what I said. Two-semester C# course you are already better than most of high school graduates can dream. I use the following for reference when I get confused with C/C++

http://www.cplusplus.com/

C library functions you will most likely encounter will be printf, scanf, malloc, free, and the string versions of the print and scan. Also using String class is frowned upon. Learn C-string instead.