Franklin

Beginning C for Arduino [electronic resource] : Learn C Programming for the Arduino / by Jack Purdum.

Author/Creator:
Purdum, Jack. author., Author,
Edition:
1st ed. 2012.
Publication:
Berkeley, CA : Apress : Imprint: Apress, 2012.
Series:
Technology in action series.
Technology in action
Format/Description:
Book
1 online resource (275 p.)
Subjects:
Computer input-output equipment.
Computer hardware.
Local subjects:
Hardware and Maker.
Computer Hardware.
Form/Genre:
Electronic books.
Language:
English
System Details:
text file
Summary:
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 control a microcontroller and related hardware How to extend C by creating your own library routines During the course of the book, you will learn the basics of programming, such as working with data types, making decisions, and writing control loops. You'll then progress onto some of the trickier aspects of C programming, such as using pointers effectively, working with the C preprocessor, and tackling file I/O. Each chapter ends with a series of exercises and review questions to test your knowledge and reinforce what you have learned.
Contents:
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
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
Variable Names in The 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
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
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
Function Type Specifier
Notes:
Includes index.
ISBN:
1-4302-4777-0
OCLC:
831115677
Publisher Number:
10.1007/978-1-4302-4777-7 doi
Loading...
Location Notes Your Loan Policy
Description Status Barcode Your Loan Policy