python - Relationship between I2C operating frequency and sample rate setting in MPU6050 -


I am interested in reading the zerososcope data by Raspberry PI and Python, but I am confused about the way MPU6050 (how to set the sample rate of accelerometer)

, xeroscope;) According to I2C clock frequency to avoid incorrect reading data (for example buffer does not contain data, or write and read faster, and so on) in knowledge, each Measurement is a 16-bit word.

Is there any connection between the two watches?

I have not touched the PI since about 18 months ago with the same chip, so I do not know how things have changed in the meantime In any event, I used smbus to read the chip. Some things that I found harder, were quite slow compared to the i2c block while reading different registers. Besides, you had to shut down sleep mode Sorry, I do not have any information at the time of the clock, but if you are trying to get a well read loop right now, then it can help you use numpy There is no need to do it, but if you are planning to manipulate your samples, then it is very helpful. GL / HF

  Import smbus import numpy # initialize bus = smbus.SMBus (1) #Sleep mode bus.write_byte_data (0x68,0x6B, 0x00) # reading in data (it can loop or Sample = numpy.empty (7) r = bus.read_i2c_block_data (0x68, 0x3B, 14) sample [0] = (r [0]  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -