Graphing ti ez430 Chronos watch data in Linux
Recently my Texas Instruments ez430 Chronos watch arrived, I preordered it the day I read about it on engadget back in November 2009, so it was nice to receive it after all this time. As a dedicated Linux user I found it disappointing that there was little in the way of Linux support provided by TI, however this was not unexpected and a linux application is currently being developed, although progress seems to be somewhat slow. However in the last week breakthroughs have been made, uguryildiz in a post on the TI forum revealed the protocol used to request data from the acceleration sensors and also for setting of the time allowing custom applications to be built using this data on Linux or any other operating system able to use usb serial.
Example code in python was also posted here, basically the protocol for getting the accelerometer data is very simple:
- After connecting the RF USB dongle supplied with the watch and putthe watch into ACC transmit mode and connect to the serial port /dev/ACM0 (on linux) with baud of 115200
- Send the hex string: 0xFF 0×07 0×03 to open a connection with the watch, it should reply 0xFF 0×06 0×03 to confirm a connection has been made
- Accelerometer data can then be requested by sending 0xFF, 0×08, 0×07, 0×00, 0×00, 0×00, 0×00
- The watch will then return seven bytes back in the form ff 06 07 tt xx yy zz where the last three bytes are the accelerometer values.
As a simple experiment I used the afore mentioned python code to get data from the watch and then combined this with a graphing gui example kindly posted by Eli Bendersky to make an application which uses matplotlib produce a live graph of the data (currently only one axis at a time).
My code can be downloaded here: chronos_graph.py
It should be noted that this code is very much hacked together, I am not a python coder and have never written anything in python before in my life, but it should work.
I am currently working on trying to get this working with processing and arduino, however serial communication from processing with the watch is proving troublesome so I reverted to python for this example.
Tags: arduino, linux, processing controlp5, Programming, python, scripting, serial, TI chronos, ubuntu


Hey,
I ported my accelerometer Python code to Processing: http://pastebin.com/f2d0940fc
Check it out.
Oops,
I had an error in a comment (yes, the comments are *that* important!) Here’s an updated copy: http://pastebin.com/f210226f8
Also, I haven’t looked at your code for this yet and you may have already fixed it in your version, but in my version of the Python code I had the x and z values switched around. The updated code is on the wiki. I actually noticed this will working on the Processing version.
Thanks, that’s great work, I tried essentially the same method but I appeared to be getting nonsense values, I look forward to trying your version later (as I assume you’ve done something slightly different that makes it correct!)
>I actually noticed this will working on the Processing version.
Ahhh, should be, “while working on..” I need to get more sleep!
Anyway, the serial stuff in Processing is more straightforward than in Python. pySerial seems kinda quirky when receiving data..Because of that I had to add some extra checks to get the valid data with it. The Processing version actually makes more sense in regards to the information Uguryildiz found.
Also, cool post!
Thanks for the code. Just what I was looking for!
Hey, thanks a million for the code, helped a lot for my project (Tennis Hit Analysis)
Hey please could you help me with this? If I connect the USB receiver to arduino and open an serial connection and send the same commands you sent there can I get data directly to my arduino, without any computer?
Thanks, I need this so much!