serial commands to accelerometer

Hello. I need an accelerometer module in which I can send serial commands to in order to get acceleration data. In other words, I would like to connect this module to my PC with some sort of cable / adapter, and write Python code on my PC (not the module) to get data from the accelerometer. Does Sparkfun sell a module with this capability? If not, can anyone recommend a solution?

Thanks,

Rob

Hi Rob.

Sadly we don’t have an accelerometer that directly connects to a computer via serial, but we do have I2C and SPI accelerometers that can connect to a micro controller and the micro controller connects to your computer serially.

You’d need to write a program that runs on the micro controller that pulls data from the accelerometer via I2C/SPI and then formats it and passes it back to your computer.

Combining the [MMA8452Q triple axis accelerometer with a [RedBoard Qwiic, a [Qwiic cable, and a bit of code might work for you.

There’s some example code in the [hookup guide to get you started but you might need to modify it or write your own code if you need to change something.](https://learn.sparkfun.com/tutorials/qwiic-accelerometer-mma8452q-hookup-guide)](Qwiic Cable - 100mm - PRT-14427 - SparkFun Electronics)](SparkFun RedBoard Qwiic - DEV-15123 - SparkFun Electronics)](https://www.sparkfun.com/products/14587)