Microsoft .NET Gadgeteer: Electronics Projects for Hobbyists and Inventors by Taylor Simon

Microsoft .NET Gadgeteer: Electronics Projects for Hobbyists and Inventors by Taylor Simon

Author:Taylor, Simon
Language: eng
Format: epub
Publisher: McGraw-Hill Education
Published: 2012-11-21T05:00:00+00:00


If you build and run this, you will see both LEDs light up—one green and one blue. Then after 1 second, the timer fires, changes the color of both LEDs, and starts them flashing.

* * *

TIP If you find that blue and green are reversed on your LED modules, a call to the property [MulticoloredLed].GreenBlueSwapped = ![MulticoloredLed].GreenBlue Swapped will fix this (using the instance name of your module).

A Combined Module Project

In the final project of the chapter, you’ll learn how to reuse code from earlier projects in a larger, more complex project. This allows you to break down your project into individually testable sections. At this point, you know all the elements of your project work, so you can concentrate on getting them to work together to achieve your final design requirements.

This project will demonstrate one of the principal aims of Gadgeteer. All of the projects so far in this chapter have used a Sytech NANO mainboard. We will demonstrate the “modular” capability of Gadgeteer by using a different mainboard in our final project. We’ll use the code from the AccelDemo and DaisyLink projects and integrate these modules into our new project, which will use a GHI Hydra mainboard. We’ll use modules from three different manufacturers, and no changes are required to the original code classes to do this. As long as the mainboard supports the Gadgeteer interface sockets required by your module code, it will work with the mainboard.

You’ll learn how to separate your application from the Gadgeteer-generated application and add the different elements required for your application to their own classes. This is essential for more complex projects, because it helps you maintain a testable and bug-free development process.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.