Chapter 2. Setting up the Free Tools

Netduino apps are built using Microsoft’s C# programming language. Straightforward yet powerful, C# allows us to focus on the “what” and “when” of programming, while letting the Netduino take care of all the low-level details.

Microsoft creates a world-class code editor (with a rich development environment) that you can use to write and debug Netduino apps. This editor is named Visual Studio, and there are both free and paid versions available. You’ll use the free version (Visual Studio Express) for the examples in this book; for programmers who already own a high-end version of Visual Studio 2010, you can safely skip to Step 2: Install the .NET Micro Framework SDK.

Apps written using C# execute within the Common Language Runtime (CLR). This Runtime provides the rich feature set used by C# apps. It works with other programming languages as well—but for the purposes of this book, I focus on C#.

Netduino uses a custom runtime designed especially for microcontrollers: the .NET Micro Framework. This scaled-down runtime needs only a small amount of storage space and working memory, unlike the higher-end editions that run on phones and computers. It also includes a number of features specific to development boards like Netduino, such as the ability to input and output electronic signals and values.

To create Netduino apps, you need to install three software packages on your computer:

  1. The Visual Studio development environment.

  2. The .NET Micro Framework software development kit (SDK).

  3. The Netduino software development kit (SDK).

Tip

At the time of writing: Visual Studio 2010 was the latest edition of the development environment; .NET Micro Framework v4.1 was the latest edition of the runtime; Netduino v4.1 SDK was the latest version of the Netduino SDK. Newer versions may be available when you read this, so be sure to grab the latest and greatest from the Netduino downloads page at http://www.netduino.com/downloads/.

Step 1: Install Visual Studio Express

Before you install any of the .NET Micro Framework or Netduino tools, install Visual Studio. At the time of writing, the download URL for the free version of Visual Studio is http://www.microsoft.com/express/downloads/.

On the download page, select the “Visual C# 2010 Express” option. You may also need to select your language. Download and run the web installer, then go through the following steps:

  1. Click Next to go past the welcome screen, then review the license terms on the next screen.

    Tip

    While Visual Studio is the name of the development environment, Microsoft often calls the C#-specific version “Visual C# Express.” You can consider both names to mean the same thing for our purposes.

  2. After you accept the license terms, press Next.

  3. At this step, you may optionally install additional software packages (Figure 2-1). None of these products are required to write apps for your Netduino.

    After selecting any optional products that you would like to install, press Next.

  4. If desired, you may change the installation location of Visual Studio Express, as shown in Figure 2-2. If you don’t have a good reason to change the default location, leave it as-is.

    Optional installation packages

    Figure 2-1. Optional installation packages

    The default installation location for Visual Studio

    Figure 2-2. The default installation location for Visual Studio

Press Install to start the installation process. This will download all required files and install them on your computer. The process will take somewhere between 15 minutes and an hour, depending on the speed of your computer, the speed of your Internet connection, and how many optional components you selected.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.140.196.244