EmbeddedRelated.com
Books
The 2026 Embedded Online Conference

Beginning C for Arduino, Second Edition: Learn C Programming for the Arduino

Purdum, Jack 2015

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.


Why Read This Book

You will learn C programming from the ground up with immediate, hands-on examples that map each language feature to real Arduino hardware. The book emphasizes good coding habits and practical projects so you can quickly move from blinking LEDs to reading sensors, using techniques refined over the author's 25 years of teaching.

Who Will Benefit

Absolute beginners, hobbyists, students, and engineers new to microcontrollers who want a practical, project-driven introduction to C programming on Arduino boards.

Level: Beginner — Prerequisites: None — suitable for complete beginners

Get This Book

Key Takeaways

  • Write clear, idiomatic C code targeted at Arduino microcontrollers
  • Use digital and analog I/O to connect sensors, LEDs, and actuators
  • Implement control flow, functions, arrays, and basic data structures for embedded programs
  • Configure and use timers, PWM, interrupts, and serial communication
  • Organize and extend code into reusable modules and small projects
  • Use the Arduino toolchain and basic debugging/serial-monitor techniques

Topics Covered

  1. 1. Introduction to Arduino and the C Language
  2. 2. Setting Up Your Arduino and Toolchain
  3. 3. Basic Data Types, Operators, and Expressions
  4. 4. Control Structures: Conditionals and Loops
  5. 5. Functions, Scope, and Modular Programming
  6. 6. Arrays, Strings, and Basic Pointers
  7. 7. Digital Input and Output — Buttons and LEDs
  8. 8. Analog Input and Output — ADC and PWM
  9. 9. Timers, Delays, and Interrupts
  10. 10. Serial Communication and Debugging
  11. 11. Interfacing Sensors, Displays, and Motors
  12. 12. Persistent Storage and EEPROM
  13. 13. Building and Extending Projects
  14. 14. Appendix: Toolchain Tips and Reference

Languages, Platforms & Tools

CArduino (Wiring-style C/C++)Arduino Uno (ATmega328P)Arduino NanoArduino MegaArduino LeonardoArduino DueOther Arduino-compatible AVR/ARM boardsArduino IDEavr-gcc / AVR toolchainavrdude (uploading)Serial MonitorPlatformIO (as an alternative workflow)

How It Compares

Compared with Simon Monk's Programming Arduino, which focuses on Arduino sketches and quick-start projects, Purdum's book emphasizes learning plain C and programming fundamentals; it also complements Jeremy Blum's Exploring Arduino by offering a stronger focus on C basics for beginners.

Related Books

Bryant, Randal, O'Hallaron,...
The 2026 Embedded Online Conference