- Source Code:“pc_chronos_gateway” Exosite Garage project on github
- Demo Dashboard:"Chronos Watch Dashboard" public dashboard on Exosite Portals
As a proof-of-concept, we’ll use the kit as-is to monitor data from the watch with Exosite Portals. Basically, the watch transmits sensor data to the CC1111 USB RF Access Point (RF AP) which is read by a laptop running python which then forwards the data to Exosite Portals using XMPP chat.
Details of the Project
Verify Out of the Box Interfaces:The kit comes with a CD that installs the “Chronos Control Center” and a USB serial driver for the RF AP. After installing the software and inserting the CC1111 RF AP into a USB slot, the Chronos Control Center app can be fired up. Clicking “Start Access Point” makes the green LED on the RF AP start blinking about once every 8 seconds.
On the watch, the lower left button (labeled “#”) is used to change mode to “ACC” (accelerometer). Once on “ACC” mode, the lower right button (labeled “˅”) begins transmitting accelerometer data from the watch (holding down the button again stops transmission). The X/Y/Z graphs in the Chronos Control Center start showing the accelerometer data real-time.
Test Communication with RF AP:The RF AP interfaces with the laptop over USB as a serial device. On my system (Win7), it always mounts as COM21. Per the developer documentation, the COM port settings are 115200, N, 8, 1 (baud, parity, data bits, stop bits). Although the documentation on the RF AP programming interface is light-to-non-existent, a Google search turned up some helpful links:
On the watch, the “#” button puts watch into “ACC” mode and the “˅” button begins transmitting accelerometer data from the watch. As soon as the watch begins transmitting, the LED on the RF AP begins blinking rapidly (10 Hz?), indicating the RF AP is receiving data. Now, when sending a “Read Acceleration Data” command (0xff 0x08 0x07 0x00 0x00 0x00), the response contains x/y/z axis accelerometer data in the last three bytes (e.g.: 0xff 0x06 0x07 0x01 0x23 0x20 0x08).
Report Data to Exosite:To report the data to Exosite, the Exosite Garage “pc_serial_gateway” project was copied and tweaked to include the specific commands for the CC1111 RF AP – the result is the “pc_chronos_gateway” Exosite Garage project on github . The options.cfg file must be filled in with XMPP account settings and a device CIK from Exosite Portals. Once that is done, and assuming all the python libraries as documented in README.txt are installed, everything should be ready to run.
Since the code is just a proof of concept, the one-second report rate of x/y/z data may not be of specific interest, but it should be pretty easy to change to report whatever data from the Chronos watch you want.