SpiSend(XL345_BW_RATE,XL345_RATE_50); | |
SpiSend(XL345_DATA_FORMAT,XL345_FULL_RESOLUtiON | XL345_RANGE_16G | XL345_INT_LOW); | |
SpiSend(XL345_OFSX,0x00); | |
SpiSend(XL345_OFSY,0x00); | |
SpiSend(XL345_OFSZ,0x05); | |
SpiSend(XL345_THRESH_ACT,0x01); | |
SpiSend(XL345_THRESH_INACT,0x01); | |
SpiSend(XL345_TIME_INACT,0x01); | |
SpiSend(XL345_ACT_INACT_CTL,XL345_ACT_X_ENABLE | XL345_ACT_Y_ENABLE | XL345_ACT_Z_ENABLE); | |
SpiSend(XL345_INT_ENABLE,XL345_DATAREADY); | |
SpiSend(XL345_INT_MAP,XL345_DATAREADY); | |
SpiSend(XL345_POWER_CTL,XL345_MEASURE); |
更多回帖