Accessing The EZ430 Chronos Accelerator data with Python
Published on: 2011-9-13
Accessing EZ430-Chronos Accelerator data with Python
Sep 13, 2011
I am trying to use the amazing EZ430-Chronos to set up some interesting demos. Gaining access to the RF access point in Python through the serial interface is very simple. The protocol used by the Chronos firmware for accelerator data transfer is documented here.
Here is a Python function which reads accelerator data:
def get_acc_data(fd): cmd = '\xff\x08\x07\x00\x00\x00\x00' r = fd.write(cmd) r = fd.read(7) if(ord(r[3]) == 1): return [ord(x) for x in r[4:7]] return []
Here is the Github link for the code. I have a simple "zero-crossing" detector in the repo.