Accessor: devices/Moto360SensorListener

devices/Moto360SensorListener

Read sensor data from a Moto 360 watch that is broadcasting the data via UDP on the local network.

FIXME: Give the app that needs to be running on the watch.

Each sensor has its own output port. The outputs will be objects with fields 'watchID', a four-character string, and 'timestamp' representing FIXME: what information is this?

See https://www.terraswarm.org/urbanheartbeat/wiki/Main/WatchSoftware for details on the software that runs on the watch.

Version:
  • $$Id$$
Author:
  • Christopher Brooks and Edward A. Lee
Source:
Inputs:
Name Type Description
listeningAddress string The interface to listen on for incoming messages. This defaults to "0.0.0.0", which means to listen on all network interfaces.
listeningPort int The port to listen on for incoming messages. This defaults to 4567.
Outputs:
Name Type Description
message The received message as a raw byte array.
listening boolean True to indicate that listening has begun, false to indicate that it has stopped.
accelerometer The accelerometer data from the watch. This is an object with fields x, y, z representing measured acceleration (or the earth's gravitational field, which is indistinguishable from acceleration). These will be in SI units of meters per second squared. The 'z' field points into the watch face, so it will be roughly +9.8 (one g) when the watch is facing up. The 'x' field is transverse to the watch, where +9.8 occurs roughly when 9 o'clock is pointing straight down. The 'y' axis is along band axis, where +9.8 will occur roughly when the 12 o'clock is pointing straight up.
gyro The gyroscope data from the watch. This is an object with fields x, y, z representing measured angular rotation (in radians per second). The 'z' field represents rotation around an axis pointing into the watch face. The 'x' field axis transverse to the watch, and the 'y' axis is along band axis. These are the same axes as for the accelerometer.
Parameters:
Name Type Description
accelerometerSensitivity If this is set to something other than zero, then this accessor will output accelerometer data only when the accelerometer reading differs in some axis by more than the specified sensitivity. A small number means high sensitivity (lots of outputs) and a larger number means low sensitivity (fewer outputs).
gyroSensitivity If this is set to something other than zero, then this gyroscope will output data only when the gyro reading differs in some axis by more than the specified sensitivity. A small number means high sensitivity (lots of outputs) and a larger number means low sensitivity (fewer outputs).

Methods

(static) setup()

Set up the accessor by defining the inputs and outputs.

Source: