Comments (7)
Dear Friends,
for your reference i add some code what i write for get raw value from accelerometer registers.
i have read accelero meter value with this code
u8 accreg[6]={0x3B,0x3C,0x3D,0x3E,0x3F,0x40,0x00};
u8 read_buffer[8]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
ret = Ql_IIC_Write_Read(1, addr, accreg, 1,read_buffer, 6); //1-is Channel, addr=0xd0, accreg-is accelero meter registers 1=must be true for communication enable, read_buffer-is read data from slave registers, 6= registers length;
dec_accx=(read_buffer[0]<<8) | read_buffer[1];
dec_accy=(read_buffer[2]<<8) | read_buffer[3];
dec_accz=(read_buffer[4]<<8) | read_buffer[5];
SerialPrint("--AX%d",dec_accx);
SerialPrint("--AY%d",dec_accy);
SerialPrint("--AZ%d",dec_accz);
thank you
with regards
kannannatesh.S
from mpu6050.
from mpu6050.
Dear kriswiner,
ya that is my question, my controller connect 0xd0 address with Accelerometer, so 0x75 register returns 0x58, my controller read data in only 8bytes in single transmission,
and one thing i am newbie for I2C Communication so i don't know to how to read/write data to the registers
the below code shows my controller how to read data from registers
must i write address for each transmission like
u8 accreg[6]={0x3B,0x3C,0x3D,0x3E,0x3F,0x40,0x00};
this above char store 6 byte address for read 6 registers,
ret = Ql_IIC_Write_Read(1, addr, accreg, 1,read_buffer, 6); //1-is Channel, addr=0xd0, accreg-is accelero meter registers 1=must be true for communication enable, read_buffer-is read data from slave registers, 6= registers length;
my doubt is
if i read single byte data from FIFO 0x74 register that data is still available in same register or that is Automatically erased,
because i send request to read 2nd byte data from same address 0x74 register that is read same data(like first request read data) or not.
sorry for my non grammatical English
I hope you understand my doubt/question
thank you
with regards
kannannatesh
from mpu6050.
from mpu6050.
Dear kriswiner,
thanks for your suggestion that is ok for my project but already board was designed with MPU6050 so i can't change the module,
if you can please help to clear my doubt
if i read first byte from 0x74 FIFO register that byte is still available in FIFO register or that is automatically erased.
thank you'
with regards
kannannatesh
from mpu6050.
from mpu6050.
k thank you
from mpu6050.
Related Issues (20)
- magnetic calibration HOT 9
- Initial accelerometer calibration HOT 46
- Merge the two projects: Aritro Mukherjee and yours HOT 1
- Magnetometer calibration expected result could not achieved HOT 1
- icm 20948 wake on motion interrupt HOT 1
- Calibration question HOT 2
- How to produce the Mxy Mxz Myz point picture? HOT 6
- Using the libriary in a NUCLEO-F746ZG and MBED? HOT 1
- Not sure how to compile successfully for Teensy 4.0. HOT 1
- Calibration Function HOT 6
- offset increasing HOT 3
- who_am_i giving register giving random address HOT 1
- Madgwick Quaternions without accelerometer data HOT 3
- Question : Teensy 3.1 *2 more power than >> Stm32F401 HOT 1
- fifo_count is always 8 after 80 msec @1K hz
- Problem with continues reading FIFO HOT 2
- Good job. Is your libary maintained yet? HOT 3
- MPU6050 Calibrated Acc and Gyro in different measurement range HOT 2
- does calibrateMPU6050 method push biases to hardware register? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpu6050.