Beginning C for Arduino learn C programming for the Arduino and compatible microcontrollers
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...
Autor principal: | |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
[Berkeley] :
Apress : Distributed to the book trade worldwide by Springer Science+Business Media
c2012.
|
Edición: | 1st ed. 2012. |
Colección: | Technology in action series.
|
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009629374806719 |
Tabla de Contenidos:
- 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