Windows 7 Sensor and Location API – Getting Started

bob's blog
bob's blog

Windows 7 Sensor and Location API – Getting Started

  • Comments 4

To get started working with the Sensor and Location API, you may want to purchase an inexpensive sensor board from Freescale called the Flexis JM Badge Board. For location you may want to purchase Streets and Trips (GPS) 2009 which includes a USB GPS device. These devices along with Visual Studio 2008 SP1 running on Windows 7 will give you a complete hardware/software prototyping development environment.

Note: you will want to order the JM Badge Rev-D version of the JM Badge board.

clip_image002

clip_image004

Back of Board

Front of Board

The board features these sensors:

  • 3-axis Accelerometer
  • Ambient Light Sensor
  • Capacitive Touch Sensor (8 buttons split 4 left and 4 right)

The board has a USB adapter to connect it to your PC. Following the directions in the User Manual, make sure your board is functioning. There are a number of built in flashed demos for testing the board.

Next you will want to install the Windows 7 driver for the board and update the board’s firmware. The directions on how to do this can be found in the Sensor Developer Kit for Windows 7. (see the README file in the root folder)

Install the JM Badge Driver for Windows 7

  1. Navigate to the location of the files for the Sensor Development Kit for Windows 7
  2. Run SensorKitDriverInstaller.exe to install the drivers on your computer
  3. Connect the board to your computer by using the USB cable
  4. Install and run the sample applications that are included in the Sensor Development Kit

For more information about the sample applications, see the documentation that in the Sensor Development Kit files.

Updating the JM Badge board firmware

  1. Connect the board to the computer by using a USB cable. A message will appear on the LED display that says “Press E4 to enter bootloader.”
  2. Press the E4 button on the back side of the board.
  3. After you press the E4 button, a bar will appear on the LED display. The drive will mount on the computer, and the drive folder will open in a new window.
  4. After the bar on the LED display stops blinking, copy the .S19 file from the \Firmware\Binaries folder into the Sensor Developement Kit folder. The flashing of the drive will begin.
  5. When flashing is completed, a bar will appear on the LED display.
  6. Disconnect the board from the USB cable.
  7. Turn the board switch to ON. On the LED display, the message “Can your badge do this?” should appear. If this message doesn’t appear, you must redo steps 1 through 7.
  8. Turn the board switch to OFF.
  9. Connect the board to the computer by using the USB cable. After connecting the board, the LED display should display the message “bootloader.”
  10. After “bootloader” is no longer displayed on the LED display, the board should automatically be enabled for use with the Windows 7 sensor platform. If this message doesn’t appear, you must redo these steps 1 through 10.

In addition to the kit you will also want to download the samples and helper classes from the MSDN Sensor and Location API page:

Testing the Windows 7 / JM Badge Communication

You can test that your board is working with Windows 7 by opening the Sensor Diagnostic Tool Visual Studio project. Build the project and run the application.

clip_image006

The application will connect to the board, enumerate the sensors and display the sensor properties and real time data coming from the sensor. This application is also a great code base for learning how to work with the .NET Framework class library that wraps the Sensor COM API.

Back

Leave a Comment
  • Please add 1 and 3 and type the answer here:
  • Post
  • When I run the driver installer, it asks me to "plug in the sensor board and press OK".  I do this, then nothing else happens.

    Ideas?

  • Hi Chris. This blog post was helpful to me to get the board working with Windows 7: http://blogs.msdn.com/gavingear/archive/2009/05/08/how-to-get-new-freescale-sensor-boards-to-work-on-windows-7.aspx

    I did this a while ago so my memroy of it is fuzzy. There was a bit ot trial and error and after a couple of false starts I got it working. You will know you have it working when you get 2 red lights blinking on the board display.

  • Hi, any idea to use multiple JM bedge boards on the same PC running Windowes 7 ?

    Thanks in advance.

    Ciao

    Angelo Cristallini

  • Hi Angelo, I do not have 2 boards to test this config. Not sure what effect it would have on the ability of the Sensor sub-system to enumerate the sensors. -bob

Page 1 of 1 (4 items)