C Programming with Arduino
Diese Publikation zitieren
C Programming with Arduino (2016), Elektor, Aachen, ISBN: 9781907920462
276
Accesses
Accesses
Inhaltsverzeichnis
- BEGINN
- Introduction
- Learning C
- Chapter 1 " Your First C Program
- 1.1 " Download and Install Atmel Studio
- 1.2 " Download and Install a Terminal Emulator
- 1.3 " Install Template Files
- 1.4 " Connecting the Hardware
- 1.5 " How C Programs are Created
- 1.6 " Start Programming
- 1.7 " About Your First C Program
- 1.8 " Analysing the Program
- 1.9 " Exercises
- 1.10 " Solutions
- 1.11 " Summary
- Chapter 2 " C Basics
- 2.1 " Input, Output and Variables
- 2.2 " Variable Types
- 2.3 " Arithmetic Operators
- 2.4 " Field Width Specifiers
- 2.5 " Compiling and Linking
- 2.6 " Errors and Warnings
- 2.7 " Exercises
- 2.8 " Solutions
- 2.9 " Summary
- Chapter 3 " Comparative Operators and Decisions
- 3.1 " Comparative Operators
- 3.2 " Decisions
- 3.3 " Exercises
- 3.4 " Solutions
- 3.5 " Summary
- Chapter 4 " The while Loop and Commenting Code
- 4.1 " The while Loop
- 4.2 " Using if Inside the while Loop
- 4.3 " The Guess My Number Game
- 4.4 " Back to the Temperature Controller Example
- 4.5 " Commenting Programs
- 4.6 " Programming Style
- 4.7 " Exercises
- 4.8 " Solutions
- 4.9 " Summary
- Chapter 5 " Functions
- 5.1 " Your Second Function
- 5.2 " Passing Data to a Function
- 5.3 " Passing More Than One Value to a Function
- 5.4 " Passing a Variable to a Function
- 5.5 " Getting a Value Back from a Function
- 5.6 " Passing Values to a Function and Receiving a Value Back
- 5.7 " Flashing LED Simulation Program
- 5.8 " Preprocessor Directives
- 5.9 " Functions Calling Functions
- 5.10 " Using Multiple Source Files
- 5.11 " Header Files
- 5.12 " How Functions Relate to Linking and Library Files
- 5.13 " Exercises
- 5.14 " Solutions
- 5.15 " Summary
- Chapter 6 " Number Systems
- 6.1 " Binary Basics
- 6.2 " The Need for Binary Numbers
- 6.3 " Numbering Systems
- 6.4 " Working with Hexadecimal Numbers in C
- 6.5 " The ASCII Alphanumeric Code
- 6.6 " Exercises
- 6.7 " Solutions
- 6.8 " Summary
- Chapter 7 " Memory and Microcontrollers
- 7.1 " Memory Basics
- 7.2 " A Look at a Memory Chip
- 7.3 " How Microprocessors Access Memory and Peripherals
- 7.4 " Pointers
- 7.5 " More on C Data Types
- 7.6 " Microcontroller Memory Sizes
- 7.7 " Summary
- Chapter 8 " Accessing AVR Ports in C
- 8.1 " AVR Pins and Ports
- 8.2 " Switching the On-board LED On and Off
- 8.3 " Controlling LEDs interfaced to a Port
- 8.4 " Increment and Decrement Operators
- 8.5 " Summary
- Chapter 9 " I/O and Memory Maps
- 9.1 " Input Pins
- 9.2 " Input and Output Pins on the Same Port
- 9.3 " AVR Memory Map
- 9.4 " Summary
- Chapter 10 " Previous C Topics Revisited
- 10.1 " Format Specifiers
- 10.2 " Field Width Specifiers Revisited
- 10.3 " Escape Sequences
- 10.4 " Loops
- 10.5 " The Problem with printf() in Embedded Systems
- 10.6 " Nested Loops and Decisions
- 10.7 " Decision Making with the switch Statement
- 10.8 " The Conditional Operator
- 10.9 " Functions and Pointers
- 10.10 " Variables and Scope
- 10.11 " Static Variables
- 10.12 " Floating Point Data Types
- 10.13 " Casts
- 10.14 " Exercises
- 10.15 " Solutions
- 10.16 " Summary
- Chapter 11 " Arrays and Strings
- 11.1 " Arrays
- 11.2 " Strings
- 11.3 " Arrays and Addresses
- 11.4 " Strings as Pointers
- 11.5 " Writing to a String using sprintf()
- 11.6 " Multidimensional Arrays
- 11.7 " Exercises
- 11.8 " Solutions
- 11.9 " Summary
- Chapter 12 " Bit Manipulation and Logical Operators
- 12.1 " Bit Manipulation with Bitwise Operators
- 12.2 " Logical Operators
- 12.3 " Operator Precedence
- 12.4 " Using Pre-defined Bit Names with Shift Operators
- 12.5 " Exercises
- 12.6 " Solution
- 12.7 " Summary
- Chapter 13 " Programming Hardware
- 13.1 " Timer Counter Hardware
- 13.2 " The Analogue to Digital Converter (ADC)
- 13.3 " The Watchdog Timer
- 13.4 " I/O Ports
- 13.5 " Summary
- Chapter 14 " Debugging
- 14.1 " Configuring Arduino Boards for Debugging
- 14.2 " Debugging Example Program
- 14.3 " Switching Compiler Optimisation Off
- 14.4 " Enabling debugWIRE on the AVR
- 14.5 " Using the Debugger
- 14.6 " Enabling ISP on the AVR / Disabling debugWIRE
- 14.7 " Exercises
- 14.8 " Summary
- Chapter 15 " Interrupts
- 15.1 " Handling Interrupts in C
- 15.2 " Using the Timer Interrupt
- 15.3 " One Millisecond Tick Interrupt
- 15.4 " Summary
- Chapter 16 " Wrapping Up the C Language
- 16.1 " Structures
- 16.2 " Unions
- 16.3 " Enumerated Type
- 16.4 " The typedef Declarator
- 16.5 " Storage Class Specifiers
- 16.6 " Type Qualifiers
- 16.7 " The goto Statement
- 16.8 " A List of All C Keywords
- 16.9 " More Preprocessor Directives
- 16.10 " C99 Variable Types
- 16.11 " Alternative Continuous Loop
- 16.12 " Summary
- Chapter 17 " C Projects
- 17.1 " Serial Port Driver Functions
- 17.2 " Converting Numbers to Strings
- 17.3 " Voltmeter
- 17.4 " Stopwatch
- 17.5 " Where to from here?
- Appendix A " The ASCII Table
- Appendix B " Arduino AVR Port Pin Mapping
- B.1 " Arduino Uno
- Appendix C " Standard Arduino I/O Circuit
- C.1 " Arduino Uno
- Appendix D " References and Resources
- D.1 " Book Website and Files
- Index