وبلاگ بلیان

آغاز برنامه‌نویسی C برای آردوینو، ویرایش دوم: یادگیری برنامه‌نویسی C برای آردوینو

BEGINNING C FOR ARDUINO, SECOND EDITION: LEARN C PROGRAMMING FOR THE ARDUINO [Paperback] Purdum

جلد کتاب آغاز برنامه‌نویسی C برای آردوینو، ویرایش دوم: یادگیری برنامه‌نویسی C برای آردوینو

معرفی کتاب «آغاز برنامه‌نویسی C برای آردوینو، ویرایش دوم: یادگیری برنامه‌نویسی C برای آردوینو» (با عنوان لاتین BEGINNING C FOR ARDUINO, SECOND EDITION: LEARN C PROGRAMMING FOR THE ARDUINO [Paperback] Purdum) نوشتهٔ Purdum, Jack، منتشرشده توسط نشر Apress : Distributed to the Book trade worldwide by Springer Science+Business Media در سال 2015. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.

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 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, Second Edition 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 libraries, including an introduction to object-oriented programming 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 at a Glance......Page 6 Contents......Page 8 About the Author......Page 20 About the Technical Reviewer......Page 22 Acknowledgments......Page 24 Assumptions About You......Page 26 Resources......Page 27 Why Choose This Book?......Page 28 Assumptions About You......Page 29 Types of Memory......Page 30 Making the Choice......Page 31 Board Size......Page 32 Breadboard......Page 33 Installing and Verifying the Software......Page 35 Attaching the USB Cable......Page 38 Port Selection......Page 39 Writing Your First Program......Page 43 What the Program Does......Page 44 Compiling and Uploading a Program......Page 46 Summary......Page 49 The Building Blocks of All Programming Languages......Page 50 Expressions......Page 51 Statements......Page 52 Statement Blocks......Page 53 Function Blocks......Page 54 1. Initialization Step......Page 55 4. Output Step......Page 56 A Revisit to Your First Program......Page 57 The setup() Function......Page 58 The loop() Function......Page 59 The Blink Program......Page 61 Single-Line Comments......Page 63 When to Use Comments......Page 64 How to Find Information About Library Functions......Page 65 The loop() Function......Page 68 Summary......Page 70 Chapter 3: Arduino C Data Types......Page 72 Keywords in C......Page 73 The boolean Data Type......Page 74 Binary Numbers......Page 75 The char Data Type and Character Sets......Page 76 Generating a Table of ASCII Characters......Page 77 The byte Data Type......Page 78 The long Data Type......Page 79 The string Data Type......Page 80 String Data Type......Page 82 Which Is Better: String or strings Built from char Arrays?......Page 83 The void Data Type......Page 84 Array Generalizations......Page 85 Symbol Tables......Page 86 lvalues and rvalues......Page 87 Understanding an Assignment Statement......Page 88 The Bucket Analogy......Page 89 Using the cast Operator......Page 91 Silent Casts......Page 92 Summary......Page 93 Relational Operators......Page 96 The if Statement......Page 97 What if Expression1 Is Logic False?......Page 98 A Modified Blink Program......Page 99 The Circuit......Page 100 Circuit Resistor Values......Page 101 The Modified Blink Program......Page 102 const Keyword......Page 103 Software Modifications to the Alternate Blink Program......Page 105 The if-else Statement Block......Page 106 Cascading if statements......Page 107 Two Types of Increment Operators (++)......Page 109 Two Flavors of the Decrement Operator(--)......Page 110 The switch statement......Page 111 A switch Variation, the Ellipsis Operator ( ...)......Page 114 The C Preprocessor......Page 115 Output Step......Page 118 Termination Step......Page 119 Summary......Page 121 Condition 1: Initialization of Loop Control Variable......Page 124 Using a for Loop......Page 125 Program to Show Expression Evaluation......Page 127 The while Loop......Page 130 When to Use a while Loop......Page 131 The sizeof() Operator......Page 132 The do-while Loop......Page 133 The break and continue Keywords......Page 134 The break Statement......Page 135 A Complete Code Example......Page 136 Step 5. Termination......Page 137 Listing 5-5 Is SDC......Page 139 Getting Rid of a Magic Number......Page 140 Loops and Coding Style......Page 141 Portability and Extensibility......Page 142 Summary......Page 143 Chapter 6: Functions in C......Page 146 Function Name......Page 147 Function Arguments......Page 148 Function Signatures and Function Prototypes......Page 150 Function Body......Page 151 Overloaded Functions......Page 152 Good Functions Avoid Coupling......Page 153 Function Design Considerations......Page 154 Function Name......Page 155 Logical Operators......Page 156 Logical AND Operator (&&)......Page 157 Logical NOT (!)......Page 158 Writing Your Own Function......Page 159 Arguments vs. Parameters......Page 160 Leap Year Calculation Program......Page 161 Passing Data into and Back from a Function......Page 164 Pass-by-Value......Page 165 Summary......Page 167 The Three Scope Levels......Page 169 Statement Block Scope......Page 170 What Does Out of Scope Mean?......Page 171 Function Block Scope......Page 172 Name Collisions and Scope......Page 173 Global Scope......Page 176 Global Scope and Name Conflicts......Page 177 The register Storage Class......Page 178 The static Storage Class......Page 179 Adding a Second Source Code File to a Project......Page 180 Why a New Source Code File?......Page 183 #include Preprocessor Directive......Page 184 A common #include Idiom......Page 185 Summary......Page 186 Defining a Pointer......Page 190 Pointer Type Specifiers and Pointer Scalars......Page 191 Pointer Scalars......Page 192 Why All Arduino Pointers Use Two Bytes for Storage......Page 193 Pointer Initialization......Page 194 Using the Address-Of Operator......Page 195 The Indirection Operator (*)......Page 196 Using Indirection......Page 197 Using the Indirection Operator in an Assignment......Page 198 Summary of Pointer Rules......Page 199 Why Are Pointers Useful?......Page 200 Modified Blink Program......Page 204 Pointers and Arrays......Page 205 The Importance of Scalars......Page 208 Pass-by-Value vs. Pass-by-Reference......Page 210 Your Turn......Page 213 One Solution......Page 214 Debug Statements Using the Serial Object......Page 217 Summary......Page 218 Relational Operations and Test for Equality Using Pointers......Page 221 Pointer Arithmetic......Page 222 Two-Dimensional Arrays......Page 227 How Many Dimensions?......Page 230 Two-Dimensional Arrays and Pointers......Page 231 Pointers to Functions......Page 233 Arrays of Pointers to Functions......Page 235 enum Data Type......Page 236 The Right-Left Rule......Page 240 Summary......Page 241 Structures......Page 243 Declaring a Structure......Page 244 Defining a Structure......Page 245 The Dot Operator......Page 246 Escape Sequences......Page 248 Memory Requirements for a Structure......Page 249 Returning a Structure from a Function Call......Page 250 Using Structure Pointers......Page 252 Arrays of Structures......Page 255 Unions......Page 256 EEPROM Memory......Page 257 Data Logging......Page 258 Shields......Page 266 Other Uses for SD Storage......Page 269 typedef......Page 271 Summary......Page 272 Preprocessor Directives......Page 276 #undef......Page 278 #line......Page 279 #if, Conditional Directives......Page 280 #include......Page 281 Parameterized Macros......Page 282 Decimal to Binary Converter......Page 284 Bitwise AND......Page 286 Bitwise OR......Page 288 Bitwise NOT (~)......Page 289 Bitwise Shift Left (
دانلود کتاب آغاز برنامه‌نویسی C برای آردوینو، ویرایش دوم: یادگیری برنامه‌نویسی C برای آردوینو