- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi everyone,
I am trying to use python to read data from mma7455
currently this is the code I am using but I am always getting 0s.
import mraa as m
x = m.Spi(0)
x.frequency(4000000)
x.write_word(0xAC05)
x.writeByte(0x08)
but I am getting zeros on all accelerometer data.
Please advice
Thank you
- Tags:
- Python
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Does it work with I2C?
Are you using 4-wire SPI? Or 3-wire?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Yes it works with i2c. I am using 4 wire SPI
J17-11 - SCL
J17-12 - SDA
J18-11 - SDO
J18-10 - CS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
Are you using an Arduino expansion board or a mini breakout board? Another customer is also trying to use the mma7455 sensor. He has run tests in I2C and SPI. He has also tried several boards and environments. Keep an eye on in case any progress is made on this thread.
What image and mraa versions are you using?
Sergio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
configure_edison --version
159
opkg info libmraa0
0.7.3
The following code gives me 0L. The same thing when I was working with I2C.
x.write_word(0xAC05)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
You'll receive a reply to your question here . Please reply to that thread what is the specific model of the sensor you're using.
Sergio

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page