Free Sample
+ Collection

C Programming for Arduino

Starting
Julien Bayle

Building your own electronic devices is fascinating fun and this book helps you enter the world of autonomous but connected devices. After an introduction to the Arduino board, you’ll end up learning some skills to surprise yourself.
$29.99
$49.99
RRP $29.99
RRP $49.99
eBook
Print + eBook

Want this title & more?

$16.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849517584
Paperback512 pages

About This Book

  • Use Arduino boards in your own electronic hardware and software projects
  • Sense the world by using several sensory components with your Arduino boards
  • Create tangible and reactive interfaces with your computer
  • Discover a world of creative wiring and coding fun!

Who This Book Is For

This book is great for people who want to learn how to design & build their own electronic devices. From interaction design art school students to the do-it-yourself hobbyist, or even simply people who want to learn electronics, this book will help by adding a new way to design autonomous but connected devices.

Table of Contents

Chapter 1: Let's Plug Things
What is a microcontroller?
Presenting the big Arduino family
About hardware prototyping
Understanding Arduino software architecture
Installing Arduino development environment (IDE)
Installing Arduino drivers
What is electricity?
Summary
Chapter 2: First Contact with C
An introduction to programming
C and C++?
The Arduino native library and other libraries
Checking all basic development steps
Using the serial monitor
Making the Arduino talk to us
Summary
Chapter 3: C Basics – Making You Stronger
Approaching variables and types of data
String
The scope concept
static, volatile, and const qualifiers
Operators, operator structures, and precedence
Types manipulations
Comparing values and Boolean operators
Adding conditions in the code
Making smart loops for repetitive tasks
Summary
Chapter 4: Improve Programming with Functions, Math, and Timing
Introducing functions
C standard mathematical functions and Arduino
Approaching calculation optimization
Time measure
Summary
Chapter 5: Sensing with Digital Inputs
Sensing the world
What does digital mean?
Introducing a new friend – Processing
Pushing the button
Playing with multiple buttons
Understanding the debounce concept
Summary
Chapter 6: Sensing the World – Feeling with Analog Inputs
Sensing analog inputs and continuous values
Introducing Max 6, the graphical programming framework
Controlling software using hardware
Multiplexing with a CD4051 multiplexer/demultiplexer
Summary
Chapter 7: Talking over Serial
Serial communication
Multiple serial interfaces
Summary
Chapter 8: Designing Visual Output Feedback
Using LEDs
Multiplexing LEDs
Using RGB LEDs
Building LED arrays
Simulating analog outputs with PWM
Quick introduction to LCD
Summary
Chapter 9: Making Things Move and Creating Sounds
Making things vibrate
Higher current driving and transistors
Controlling a servo
Multiple servos with external power supply
Controlling stepper motors
Air movement and sounds
Playing basic sound bits
Improving the sound engine with Mozzi
Controlling the sound using envelopes and MIDI
Playing audio files with the PCM library
Summary
Chapter 10: Some Advanced Techniques
Data storage with EEPROMs
Using GPS modules
Arduino, battery, and autonomy
Drawing on gLCDs
Using VGA with the Gameduino Shield
Summary
Chapter 11: Networking
An overview of networks
Wiring Arduino to wired Ethernet
Bluetooth communications
Playing with Wi-Fi
Tweeting by pushing a switch
Summary
Chapter 12: Playing with Max 6 Framework
Communicating easily with Max 6 – the [serial] object
Parsing and selecting data coming from Arduino
Creating a sound-level meter with LEDs
Pitch shift effect controlled by hand
Summary
Chapter 13: Improving your C Programming and Creating Libraries
Programming libraries
Creating your own LED-array library
Memory management
Mastering bit shifting
Reprogramming the Arduino board
Summary
Conclusion

What You Will Learn

  • Understand what an Arduino board is
  • Sense the world through a variety of digital inputs
  • Feel the world with analog sensors
  • Design a visual output feedback system
  • Use Max6 and Processing with Arduino
  • Connect your Arduino to wired and wireless networks
  • Add GPS localisation modules to your Arduino

In Detail

Physical computing allows us to build interactive physical systems by using software & hardware in order to sense and respond to the real world. C Programming for Arduino will show you how to harness powerful capabilities like sensing, feedbacks, programming and even wiring and developing your own autonomous systems.

C Programming for Arduino contains everything you need to directly start wiring and coding your own electronic project. You’ll learn C and how to code several types of firmware for your Arduino, and then move on to design small typical systems to understand how handling buttons, leds, LCD, network modules and much more.

After running through C/C++ for the Arduino, you'll learn how to control your software by using real buttons and distance sensors and even discover how you can use your Arduino with the Processing framework so that they work in unison. Advanced coverage includes using Wi-Fi networks and batteries to make your Arduino-based hardware more mobile and flexible without wires. If you want to learn how to build your own electronic devices with powerful open-source technology, then this book is for you.

Authors

Read More

Recommended for You

Arduino Robotic Projects
$ 26.99
Arduino Home Automation Projects
$ 14.99
Internet of Things with the Arduino Yún
$ 13.99