Table of Contents

Motion / Sensors / Accel

NXP

NXP : FXOS8700CQ

NXP : MMA

MMA845X
0x1C : MMA8452Q
wget https://raw.githubusercontent.com/ControlEverythingCommunity/MMA8452Q/master/Python/MMA8452Q.py
/usr/sbin/i2cdetect -y 1 | grep -- '- 1c -' && python MMA8452Q.py

ADDRESS=0x1C

STATUS=0x00
WHO_AM_I=0x0D
SYSMOD=0x0B
ASLP_COUNT=0x29
CTRL_REG1=0x2A
CTRL_REG2=0x2B
XYZ_DATA_CFG=0x0E

#
sudo i2cget -y 1 $ADDRESS $WHO_AM_I # 0x2a

sudo i2cset -y 1 $ADDRESS $CTRL_REG1 0x00
sudo i2cget -y 1 $ADDRESS $CTRL_REG1 # 0x00

sudo i2cset -y 1 $ADDRESS $CTRL_REG1 0x01

sudo i2cget -y 1 $ADDRESS $SYSMOD # 0x00
sudo i2cset -y 1 $ADDRESS $SYSMOD 0x01
sudo i2cget -y 1 $ADDRESS $SYSMOD # 0x00

sudo i2cget -y 1 $ADDRESS $XYZ_DATA_CFG # 0x00
sudo i2cset -y 1 $ADDRESS $XYZ_DATA_CFG 0x00

sudo i2cdump -y 1 0x1C  

No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: ff 7f f0 80 00 7f f0 00 00 00 00 01 00 2a 00 00    .???.??....?.*..
10: 00 80 00 44 84 00 00 00 00 00 00 00 00 00 00 00    .?.D?...........
20: 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00 00    ...........?....
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
80: 00 7f f0 80 00 7f f0 00 00 00 00 00 00 2a 00 00    .???.??......*..
90: 00 80 00 44 84 00 00 00 00 00 00 00 00 00 00 00    .?.D?...........
a0: 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00 00    ...........?....
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

www.amazon.fr_images_i_41hdw3dirpl._ac_.jpg

www.amazon.fr_images_i_41zzq9f_2bogl._ac_.jpg

MMA8451

MISC

MORE

motion.txt · Last modified: 2020/09/17 05:06 by rzr
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki