Beginning C for Arduino, Second Edition Learn C Programming for the Arduino
Beginning C for Arduino, Second Edition is written for those who have no prior experience with microcontrollers or programming but would like to experiment and learn both. Updated with new projects and new boards, this book introduces you to the C programming language, reinforcing each programming s...
Autor principal: | |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Berkeley, CA :
Apress
2015.
|
Edición: | 2nd ed. 2015. |
Colección: | Technology in action Beginning C for Arduino
|
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009629917706719 |
Tabla de Contenidos:
- Contents at a Glance; Contents; About the Author; About the Technical Reviewer; Acknowledgments; Introduction; Assumptions About You; Resources; Chapter 1: Introduction; Why Choose This Book?; Assumptions About You; What You Need; An Atmel-Based Microcontroller Card; Types of Memory; Flash Memory; SRAM; EEPROM; Making the Choice; Board Size; Input/Output (I/O) Pins; Breadboard; Miscellaneous Parts; Installing and 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 ProgramWriting Your First Program; What the Program Does; Compiling and Uploading a 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 Your First Program; The setup() Function; The loop() Function; Arduino Program Requirements; The Blink Program; Program Comments
- Single-Line CommentsMulti-line Comments; When to Use Comments; The setup() Function in Blink; How to Find Information About Library Functions; The loop() Function; delay(): Good News, Bad News; Summary; Chapter 3: Arduino C Data Types; Keywords in C; Variable Names in C; The boolean Data Type; Walking Through the Function Call to ReadSwitchState (); Binary Numbers; 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 TypeString Data Type; Which Is Better: String or strings Built from char Arrays?; The void Data Type; The array Data Type; Array Generalizations; Defining vs. Declaring Variables; Language Errors; Symbol Tables; lvalues and rvalues; Understanding an Assignment Statement; The Bucket Analogy; Using the cast Operator; The Cast Rule; Silent Casts; Summary; Chapter 4: Decision Making in C; Relational Operators; The if Statement; What if Expression1 Is Logic True?; What if Expression1 Is Logic False?; Braces or No Braces?; A Modified Blink Program; The Circuit
- Summary