NoobMaster69 Posted April 29, 2019 Report Share Posted April 29, 2019 import smbus import time # Get I2C bus bus = smbus.SMBus(1) # MPU-6000 address, 0x68(104) # Select gyroscope configuration register, 0x1B(27) # 0x18(24) Full scale range = 2000 dps bus.write_byte_data(0x68, 0x1B, 0x18) # MPU-6000 address, 0x68(104) # Select accelerometer configuration register, 0x1C(28) # 0x18(24) Full scale range = +/-16g bus.write_byte_data(0x68, 0x1C, 0x18) # MPU-6000 address, 0x68(104) # Select power management register1, 0x6B(107) # 0x01(01) PLL with xGyro reference bus.write_byte_data(0x68, 0x6B, 0x01) I wish to convert the measurement range from +-16g of the accelerometer to +-2g and 2000dps of the gyroscope to 250dps. Any Gurus can help me on this? This is the register map for MPU 6050 https://www.invensense.com/wp-content/u ... r-Map1.pdf Quote Link to comment Share on other sites More sharing options...
NoobMaster69 Posted April 30, 2019 Author Report Share Posted April 30, 2019 Problem solved. bus.write_byte_data(0x68, 0x1C, 0x00) 2g bus.write_byte_data(0x68, 0x1C, 0x08) 4g bus.write_byte_data(0x68, 0x1C, 0x10) 8g bus.write_byte_data(0x68, 0x1C, 0x18) 16g Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.