Beginning C for Arduino : Learn C Programming for the Arduino


Jack. Purdum
Bok Engelsk 2012 · Electronic books.
Annen tittel
Utgitt
Dordrecht : : Springer, , 2012.
Omfang
1 online resource (275 p.)
Opplysninger
Description based upon print version of record.. - Title Page; Copyright Page; Dedication Page; Contents at a Glance; Table of Contents; About the Author; About the Technical Reviewer; Acknowledgments; Introduction; Assumptions About You; Resources; CHAPTER 1 Introduction; Assumptions About You; What You Need; An Atmel-Based Microcontroller Card; Memory; Size; Cost; Breadboard; Miscellaneous Parts; Verifying the Software; Verifying the Hardware; Attaching the USB Cable; Selecting Your μc Board in the Integrated Development Environment; Port Selection; Loading and Running Your First Program; The Blink Program; Running the Blink Program Code. - A Modified Blink ProgramThe Circuit; The Program Code; Software Modifications to the Alternate Blink Program; The if-else Statement; Cascading if Statements; The Increment and Decrement Operators; Two Types of Increment Operator (++); Two Flavors of the Decrement Operator (--); Precedence of Operators; The switch Statement; The goto Statement; Getting Rid of Magic Numbers; The C Preprocessor; Heads or Tails; Initialization Step; Input Step; Process Step; Output Step; Termination Step; Something to Think About; Summary; Exercises; CHAPTER 5 Program Loops in C. - Compiling the Blink Program CodeUploading the Blink Program; Summary; CHAPTER 2 Arduino C; The Building Blocks of All Programming Languages; Expressions; Statements; Operator Precedence; Statement Blocks; Function Blocks; The Five Program Steps; 1. Initialization Step; 2. Input Step; 3. Process Step; 4. Output Step; 5. Termination Step; The Purpose of the Five Program Steps; A Revisit to the Blink Program; Program Comments; Single-Line Comments; Multiline Comments; Data Definition; The setup Function; The loop Function; Summary; Exercises; CHAPTER 3 Arduino C Data Types; Keywords in C. - Function Type Specifier. - The Characteristics of Well-Behaved LoopsCondition 1: Variable Initialization; Condition 2: Loop Control Test; Condition 3: Changing the Loop Control Variable's State; Using a for Loop; When to Use a for Loop; The while Loop; When to Use a while Loop; The do-while Loop; The break and continue Keywords; The break Statement; The continue Statement; A Complete Code Example; Step 1. Initialization; Step 2. Input; Step 3. Process; Step 4. Output; Step 5. Termination; Listing 5-1 is Sorta Dumb Code; Loops and Coding Style; Summary; Exercises; CHAPTER 6 Functions in C; The Anatomy of a Function. - Variable Names in CThe boolean Data Type; The char Data Type; Binary Data; The char Data Type and Character Sets; Generating a Table of ASCII Characters; The byte Data Type; The int Data Type; The word Data Type; The long Data type; The float and double Data Types; Floating Point Precision; The string Data Type; String Data Type; The void Data Type; The array Data Type; Defining versus Declaring Variables; Symbol Tables; lvalues and rvalues; The Bucket Analogy; Using the cast Operator; Summary; Exercises; CHAPTER 4 Decision Making in C; Relational Operators; The if Statement. - Beginning C for Arduino is written for those who have no prior experience with microcontrollers or programming but would like to experiment and learn both. This book introduces you to the C programming language, reinforcing each programming structure with a simple demonstration of how you can use C to control the Arduino family of microcontrollers. Author Jack Purdum uses an engaging style to teach good programming techniques using examples that have been honed during his 25 years of university teaching. Beginning C for Arduino will teach you: The C programming language How to use C to co
Emner
Sjanger
Dewey
ISBN
9781430247760

Bibliotek som har denne