MPU3050 driver


The MPU3050 driver for inertial measurement is used in conjunction with the MPU3050 compass to measure the devices heading. The heading is measured with a magnetometer.

Note: if the IMU used can measure its heading (has a magnetometer) then the heading readings will be supplied instead of yaw data.

Driver Parameters

The MPU3050 driver for the MPU3050 measurement sensor has one parameter that needs to be configured:

M I2C Address

This is the address through which the magnetometer can be interfaced. The address is fixed at 0x1e.



On the MPU3050 sensor the SDA and SCL ports are connected to the SDA and SCL ports on the Builder Base. The GND and VDD ports on the chip are then connected to the GND and 3.3V ports on the Builder Base respectively.



Used Pins

Used Pins


Used Pins



Serial Clock Line


Serial Data Line


This pin provides the power


This pin provides the GND

How to write an App

Navigate to the App Builder and create a new application. You can find the “Distance Ultrasonic” code object under the “Hardware” Tab in the object drop down menu on the left, or you can also use the search bar.







Drag the “IMU” object onto the grid.


Next, locate the “Text” Object under the Interface tab and drag five of them onto the grid.





Finally, connect the “IMU”, “Roll”, “Pitch”, “Yaw”, and “Heading” ports from the IMU Object block to the “In” ports on each of their respective text blocks, name each of the text blocks accordingly, and save your application.


How to create a firmware

Navigate to the Firmware Builder and create a new firmware file.

Click the “+ Add Hardware” button and listed under the “Sensors” tab find the “Distance Measurement” hardware option.

Give your device a name, and click “Add Device”




Next, select the “MPU3050” under the driver dropdown menu.



For this example we select:

  • M I2C address: 0x1e

  • AC I2C address: 0x6b


You may now save your firmware file and upload it to one of your clients.




Supported Hardware

  • MPU3050