Building the Software

Writing the software for the base of this project is relatively easy due to the very simple APIs of both the Wiimote library and the Phidget library.

Software Requirements

Several libraries need to be downloaded and installed for use by this project. First, the Phidget API must be installed so the application can communicate with the attached Phidget Interface Kit. This library is updated frequently, and occasionally changes are made that break existing code. Therefore, the specific version used with this project can be found at the book's website: http://www.c4fbook.com/WiimoteCar.

Next, the Managed Wiimote library must be available to the application. This chapter was written using version 1.5.2 of the Wiimote library, which is available at the book's website or at http://www.codeplex.com/WiimoteLib.

Software Implementation

Start by creating a new Windows Application in your preferred language, either C# or Visual Basic. Once Visual Studio has set up the application, several references will need to be set. First, the application will be communicating with the Wiimote, so the managed Wiimote library, WiimoteLib.dll, needs to be referenced. Copy the WiimoteLib.dll file from the distribution to the local project directory so you can easily find it when adding the reference. The application will also use a Phidget Interface Kit, so a reference to the Phidget library, Phidget21.NET.dll, also needs to be set (see Figure 8-8).

Figure 8-8. Project references set

Note

Note ...

Get Coding4Fun now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.