Beginning C for Arduino
Download Full Version of the eBook "Beginning C for Arduino"
Download - Beginning C for Arduino by Jack Purdum - PDF
I can remember buying my first electronic calculator. I was teaching a graduate level statistics course and I had to have a calculator with a square root function. Back in the late 1960s, that was a pretty high-end requirement for a calculator. I managed to purchase one at the “educational discount price” of $149.95! Now, I look down at my desk at an ATmega2560 that is half the size for less than a quarter of the cost and think of all the possibilities built into that piece of hardware. I am amazed by what has happened to everything from toasters to car engines. Who-da-thunk-it 40 years ago?
I am coming to the microcontroller world from a different direction than many people who have a similar interest. My primary area of expertise has been software engineering. However, I have always loved electronics and maintain my amateur radio license, which I got more than 50 years ago. Yet, all the potential processing power that is built into the Atmel family of microcontrollers is dormant unless some form of software unleashes that power. Indeed, artfully craft the two areas of hardware and software together and you really have something exciting.
The purpose of this text is to teach you the C programming language. To those whose eyes just glazed over while muttering: “Just what we need...another C programming text, “ I hope to convince you that this book is different. First, many texts seem to relegate programming to the back seat, concentrating instead on the hardware aspects of the microcontroller development process. Indeed, after reading some microcontroller books, you come away with the feeling that software in general, and programming specifically, is an evil that one must simply endure. That is, the “really good stuff” is all in the hardware. Yet, great hardware running on so-so software is bound by a worst case reality of a so-so result. Crafting good software can be every bit as rewarding as a well-engineered piece of hardware.
A second reason why this book is different is my teaching experience. I had an employee who was one of the most gifted programmers I ever met. One summer I assigned an intern to him, and, within a week, the intern quit in tears, saying he was impossible to work with, let alone learn anything from. Just because you are a good programmer or engineer does not automatically make you a good teacher. Not until you have seen 150 pairs of eyes staring at you like a deer in the headlights can you appreciate that what you thought was obvious really isn’t. Trial and error over 25 years has helped me develop teaching techniques that lift students over the most likely stumbling blocks.
Finally, teaching does not have to be dry or boring. I have tried to make this text read as though you and I are talking face-to-face about programming. Although you are the final judge, I hope you come away with an enjoyment for programming that I have. Programming can be a most enjoyable pasttime.