picamuser
Posts: 10
Joined: Mon Jul 21, 2014 9:21 pm

How to do a repeated start with the raspberry pi?

Tue Nov 25, 2014 11:38 pm

I am trying to use an MMA8452Q accelerator with the raspberry pi B+. I have it hooked up to 5 gpio pins on the pi, J8 pins 1/3/5/7/9. After installing some i2c libraries, the pi recognizes the device with i2cdetect, on address 0x1d. However, when I try to read from the device, I always get back a 0 reading. Further research uncovered that the accelerator needs a repeated start in order to turn it on, but it is unsupported by the hardware. How would you emulate the repeated start on the raspberry pi, or is there another way to get it working?

danjperron
Posts: 3332
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: How to do a repeated start with the raspberry pi?

Tue Nov 25, 2014 11:52 pm

Maybe some of your code will be great.

Python,? C? C++? Java?

What is exactly unsupported?
What is you I2C library?


Daniel

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: How to do a repeated start with the raspberry pi?

Wed Nov 26, 2014 8:32 am

Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

Return to “Interfacing (DSI, CSI, I2C, etc.)”