Supplemental files and examples for this book can be found at http://examples.oreilly.com/0636920018032/. Please use a standard desktop web browser to access these files, as they may not be accessible from all ereader devices.
All code files or examples referenced in the book will be available online. For physical books that ship with an accompanying disc, whenever possible, weve posted all CD/DVD content. Note that while we provide as much of the media content as we are able via free download, we are sometimes limited by licensing restrictions. Please direct any questions or concerns to .
Preface
Computers surround us. Im not speaking of laptops or tablets or cell phones. Billions of remote controls, thermostats, sensors, and gadgets of all sorts have little computers inside them. And while millions of software engineers develop applications for phones, computers, and the Webthe programming languages and skills that apply there are quite a bit different than those needed to develop code for tiny embedded microcontrollers.
Or at least, they were.
In 2004, Microsoft introduced the SPOT Smart Watch. It ran a tiny version of their desktop .NET programming runtime and enabled application developers to write software for its tiny microcontroller using the C# programming language they already knew. Almost a decade later, this runtime is now in its fourth major version, is running on millions of devices around the world, and has grown to enable tinkerers to use traditional software development skills to build their own electronics projects with Netduino.
Like me, you may be a tinkerer. You may like building things or tearing things apart to understand how they work. You may want to build your own web-based coffee machine, Morse code generator, or electronically enhanced Halloween costume.
Or you may be an educator or student who wants to learn how electronics work. Netduino and the .NET Micro Framework enable you do this without drowning in a sea of datasheets, and without needing to understand the intricacies of microcontroller registers at the same time.
Because Netduino is open source, all design files and source code are included. If you desire to become an expert or just need a reference to understand how things work behind the scenes, that is all provided at no charge. Netduino gives you freedom to build, to remix, and to have fun.
And for many, Netduino is about fun: to learn how electronics work, to build cool projects, and to play. For others, Netduino is a serious tool used to develop viable products.
Whether you are interested in Netduino for fun or for profit, there is an online community of tens of thousands of fellow makers at http://forums.netduino.com. Come join us in learning, in building, and in sharing our electronics achievements. I look forward to meeting you there.
What You Need to Know
This book is written with the goal of giving non-programmers enough training to successfully build the samples in this book, while providing software engineers the ability to delve into electronics using their sophisticated programming skills.
If you have written scripts for a web page, you have the skills necessary to tackle this book. If you have used a word processor before, you should be able to follow along with the samples. And if you write desktop or web applications in C# for a living, you should enjoy this journey.
How to Use This Book
This book is intended to be read from beginning to end. I start by introducing Netduino and walking you through installation of the free Windows-based development tools. I then introduce electronic components like buttons, LEDs, and speakersand show you how to use them. Finally, I show you how to connect an Internet-enabled Netduino to the Web.
These examples are all building blocks, giving you tools in your electronics tool chest. And while it is a lot of fun to write code that changes the color of LEDs or plays music on a tiny speaker, the building blocks are ultimately for use in your own projects.
As you build your own projects or reproduce the projects of fellow Netduino community members, youll inevitably need electronics parts. Stores like RadioShack and Micro Center can provide you with drawers full of components you can use to build projects, and online stores like MakerShed (http://www.makershed.com) provide both parts and full kits (with instructions) that can guide you in your tinkering ways.
Enjoy the journey. Its a lot of fun.
Conventions Used in This Book
The following typographical conventions are used in this book:
Italic
Indicates new terms, URLs, email addresses, filenames, and file extensions.
Constant width
Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.
Constant width bold
Shows commands or other text that should be typed literally by the user.
Constant width italic
Shows text that should be replaced with user-supplied values or by values determined by context.
Tip
This icon signifies a tip, suggestion, or general note.
Using Code Examples
This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless youre reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from OReilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your products documentation does require permission.