Balance demo

From University of Washington - Ubicomp Research Page
Jump to: navigation, search

Start sequence

  • Turn on the phone.
    • The phone power button is located on the top of the phone.
  • Turn on the MSP.
    • The power button for the MSP box is located on the right side of the case and is recessed.
  • Run BluetoothServer.
    • Open the application menu.
      • Hit the button with the loop image. Lower left, just right of the pencil image.
    • Select My Own.
    • Select BluetoothS... (BluetoothServer).
    • Wait for the flashing blue LED on the MSP to turn solid blue.
  • Run ActivityAccumulator.
    • Open the application menu.
      • Hit the button with the loop image. Lower left, just right of the pencil image.
    • Select My Own.
    • Select ActivityAccu... (ActivityAccumulator).
  • Run Can Balance.
    • Open the application menu.
      • Hit the button with the loop image. Lower left, just right of the pencil image.
    • Select My Own.
    • Select Python.
    • Under Options, select Run script
    • Select CAN_v2i.py

Web Camera

  1. Plug in web cam into USB port (should take about 30 seconds to show up so should probably do this before the talk starts)
  2. Double click Logitech QuickCam on the desktop
  3. Click the movie/person icon on the top to open the video window
  4. Make sure the ‘Select Image Size’ says (VGA) 640x480 (too big and its slow too small and its hard to read)
  5. If the focus is off, hit the button with the 2 gears to open the settings menu. Make sure ‘Auto Focus’ is OFF and slide the manual focus around till you find something that’s comfortable. Hit the gears icon again and the settings window will go away.

Using CanBalance

Entering in values

  • To enter in activities manually, use [Options --> Add Activity]... from the ActM tab
  • To enter in foods manually, use either [Options --> Add Food], [Options --> Add from Favorites], or [Options --> Add Food CHIP] from the Food tab

Clearing out values

  • To clear out the activities detected by the MSP, go to [Options --> See Navigation List --> #13] from any of the tabs.
  • To clear out the manually entered activities and the foods, go to [Options --> See Navigation List --> #12] from any of the tabs.

MSP LED diagnostics

The right-most (toward the corner) three LEDs provide information on the state of the device and the bluetooth link. Additionally a green and an orange LED to the left are lit when the device is plugged in/charging.

  • No LEDs: device off
  • Red, green, blue solid: just powered on
  • Green solid, no others: device on, not accepting bluetooth connections (Did it just power on? Wait up to 20 seconds.)
  • Green solid, blue flashing: device on, waiting to accept a bluetooth connection.
  • Green, blue solid: device on, bluetooth link established.

It may take up to 30 seconds for the blue LED to go from blinking to solid and vice versa.

Troubleshooting

BluetoothServer or ActivityAccumulator won't start

This is unfortunately a mystery. Rebooting the phone is the best option to make detected activities work again.

Detected activities aren't updating in CanBalance's ActD tab

The tab must be re-loaded to update. (Navigate away from it and back.) Ensure all three applications are running (CanBalance, BluetoothServer, ActivityAccumulator). Hold down the application menu button to see a list of running applications. Restart any missing applications. Be aware that sometimes the applications need to be restarted more than once, and sometimes they fail to restart completely (see above).

Components

Dataflow from physical sensing to the CanBalance application in the demo configuration.

The two hardware systems involved in the demo configuration are the MSP (the MSB stacked on the IMote2) and the Nokia N80.

The MSP collects data sensed from the phsyical environment. (In this demo, only the accelerometers are sampled.) The physical data are processed by the Library for Inference of Real-time Activities (a.k.a. LIRA or inference). inference runs a step detection algorithm to count footsteps; it also performs a simple classification of the accelerometer data into sitting, walking, or running based on the difference between extreme values of the accelerometer magnitude. The output is sent to bt-listener, which transmits over the Bluetooth radio.

On the mobile phone, BluetoothServer maintains the Bluetooth link to the MSP and distributes the data to other processes on the phone. ActivityAccumulator interprets and accumulates inference's output into a step count and activity durations. CanBalance uses the detected activities as one of its inputs into the balance equation.