Program language doesn't make sense! Book to learn?

sarouje:
I could see you are very new to programming. So it will be better you start the basics of C programming. Any good beginners C book will help you. Once you learn the basics of C then you can move on to Arduino programs.

Beginners C book will teach you.

  • Syntax of C program
  • Variable decleration and scopes
  • Conditional statements
  • Functions

Then mixing all the above. Once you do that you will be very comfortable to deal with Arduino.

When I started I can understand programming very well but Electronics was totally new to me :slight_smile:

I disagree Sony. Unless the OP has a system available so that programs can be compiled and run, the reading will be very abstract. Even with a compiler, editor and computer, the programs will likely rely on standard libraries, and standard I/O, which are not needed in an Arduino program.

Purdum's book does cover all of the topics you mentioned, in fact, it is a book for beginners that uses Arduino as a platform, instead of the more commonly assumed, unix (or unix-ish) shell that most other beginners books assume the reader has. Other than that, it is similar to other beginning C books.

Last summer, I was working with students in a microprocessor course (I wasn't teaching it, but I was an available resource for the students.) The biggest problem students had was understanding that Arduino (as well as Microchip PIC boards, which for some reason the instructor preferred) uses the (familiar to us) setup() and loop() structure. Many of the students tried using their own loops, and began their program with a main() function. Merely learning about the overall structure of an Arduino program was a great revelation, and they were then able to make progress.

My point in this is that if the desire is to learn to program a microprocessor, getting lessons that compile and run on an Arduino from the get-go is the easiest and fastest way to move forward.