 # Using the MPU9250 to get Real-time Motion Data © GPL3+

Code and explanation for getting directional and motion data from the raw sensor outputs.

• 114,043 views
• 36 respects

## Apps and online services

Main article: https://paulsite.com/mpu_programming/

Motion Processing is an important concept to know. If you want to interact with real time data you should be able to interact with motion parameters such as: linear acceleration, angular acceleration, and magnetic north.

The MPU9250 has an accelerometer, gyroscope, and a magnetometer. The information that we can get from a MPU9250’s are: yaw angle, pitch angle, and roll angle. Given that, I will only deal with yaw here in this post.

### Processing Data from the MPU9250

The MPU has a 16-bit register for each of its three sensors. They temporarily store the data from the sensor before it is relayed via I2C.

We receive the data 8-bits at a time and then concatenate them together to form 16-bits again. As shown in the following snippet from kriswiners code:

``fifo_count = ((uint16_t)data << 8) | data;packet_count = fifo_count/12;// How many sets of full gyro and accelerometer data for averagingfor (ii = 0; ii < packet_count; ii++) {int16_t accel_temp = {0, 0, 0}, gyro_temp = {0, 0, 0};readBytes(MPU9250_ADDRESS, FIFO_R_W, 12, &data); // read data for averagingaccel_temp = (int16_t) (((int16_t)data << 8) | data  ) ;  // Form signed 16-bit integer for each sample in FIFOaccel_temp = (int16_t) (((int16_t)data << 8) | data  ) ;accel_temp = (int16_t) (((int16_t)data << 8) | data  ) ;gyro_temp  = (int16_t) (((int16_t)data << 8) | data  ) ;gyro_temp  = (int16_t) (((int16_t)data << 8) | data  ) ;gyro_temp  = (int16_t) (((int16_t)data << 8) | data) ;accel_bias += (int32_t) accel_temp; // Sum individual signed 16-bit biases to get accumulated signed 32-bit biasesaccel_bias += (int32_t) accel_temp;accel_bias += (int32_t) accel_temp;gyro_bias  += (int32_t) gyro_temp;gyro_bias  += (int32_t) gyro_temp;gyro_bias  += (int32_t) gyro_temp;}``

Calibrating the Raw Data

The data that is received then must be calibrated according to the users environment. The calibration of the magnetometer is required to compensate for Magnetic Declination. The exact value of the correction depends on the location. There are two variables that have to calibrated: yaw and magbias.

The below shows yaw calibration for a specific magnetic declination (at Potheri, Chennai, India). The declination data can be obtained from different sites:

``yaw   = atan2(2.0f * (q * q + q * q), q * q + q * q – q * q – q * q);pitch = -asin(2.0f * (q * q – q * q));roll  = atan2(2.0f * (q * q + q * q), q * q – q * q – q * q + q * q);pitch *= 180.0f / PI;yaw   *= 180.0f / PI;yaw   += 1.34; /* Declination at Potheri, Chennail ,India  Model Used:    IGRF12    HelpLatitude:    12.823640° NLongitude:    80.043518° EDate    Declination2016-04-09    1.34° W  changing by  0.06° E per year     (+ve for west )*/``

See the below snippet [the given snippet the data for calibration of magbias comes from another function (`magcalMPU9250(float * dest1, float * dest2)`):

``readMagData(magCount);  // Read the x/y/z adc valuesgetMres();//    magbias = +470.;  // User environmental x-axis correction in milliGauss, should be automatically calculated//    magbias = +120.;  // User environmental x-axis correction in milliGauss//    magbias = +125.;  // User environmental x-axis correction in milliGauss// Calculate the magnetometer values in milliGauss// Include factory calibration per data sheet and user environmental correctionsmx = (float)magCount*mRes*magCalibration – magBias;  // get actual magnetometer value, this depends on scale being setmy = (float)magCount*mRes*magCalibration – magBias;mz = (float)magCount*mRes*magCalibration – magBias;}``

### Auto Calibration of the Magnetometer

This is one of the simplest and important part of the MPU code. The function `magcalMPU9250(float * dest1, float * dest2)`  calibrates the magnetometer while you move the sensor in a figure eight. It stores the maximum and minimum readings and takes the average.

``void magcalMPU9250(float * dest1, float * dest2) {    uint16_t ii = 0, sample_count = 0;    int32_t mag_bias = {0, 0, 0}, mag_scale = {0, 0, 0};    int16_t mag_max = {0x8000, 0x8000, 0x8000}, mag_min = {0x7FFF, 0x7FFF, 0x7FFF}, mag_temp = {0, 0, 0};     Serial.println(“Mag Calibration: Wave device in a figure eight until done!”);    sample_count = 128;     for(ii = 0; ii < sample_count; ii++) {        readMagData(mag_temp);  // Read the mag data        for (int jj = 0; jj < 3; jj++) {            if(mag_temp[jj] > mag_max[jj]) mag_max[jj] = mag_temp[jj];            if(mag_temp[jj] < mag_min[jj]) mag_min[jj] = mag_temp[jj];        }    delay(135);  // at 8 Hz ODR, new mag data is available every 125 ms    }     // Get hard iron correction    mag_bias  = (mag_max + mag_min)/2;  // get average x mag bias in counts    mag_bias  = (mag_max + mag_min)/2;  // get average y mag bias in counts    mag_bias  = (mag_max + mag_min)/2;  // get average z mag bias in counts     dest1 = (float) mag_bias*mRes*magCalibration;  // save mag biases in G for main program    dest1 = (float) mag_bias*mRes*magCalibration;    dest1 = (float) mag_bias*mRes*magCalibration;    // Get soft iron correction estimate    mag_scale  = (mag_max – mag_min)/2;  // get average x axis max chord length in counts    mag_scale  = (mag_max – mag_min)/2;  // get average y axis max chord length in counts    mag_scale  = (mag_max – mag_min)/2;  // get average z axis max chord length in counts     float avg_rad = mag_scale + mag_scale + mag_scale;    avg_rad /= 3.0;    dest2 = avg_rad/((float)mag_scale);    dest2 = avg_rad/((float)mag_scale);    dest2 = avg_rad/((float)mag_scale);    Serial.println(“Mag Calibration done!”);}``

for more details please go to the source:

https://github.com/kriswiner/MPU6050/wiki/Simple-and-Effective-Magnetometer-Calibration

Permanent Calibration for a Particular Place

If you don't want auto calibrate every time, then you just have to note the average values of magbias[] after it has been calculated and use this snippet:

``readMagData(magCount);  // Read the x/y/z adc valuesgetMres();magbias = +470.;  // User environmental x-axis correction in milliGauss, should be automatically calculatedmagbias = +120.;  // User environmental x-axis correction in milliGauss    magbias = +125.;  // User environmental x-axis correction in milliGauss// Calculate the magnetometer values in milliGauss// Include factory calibration per data sheet and user environmental correctionsmx = (float)magCount*mRes*magCalibration – magBias;  // get actual magnetometer value, this depends on scale being setmy = (float)magCount*mRes*magCalibration – magBias;mz = (float)magCount*mRes*magCalibration – magBias;}``

The values 470, 120, 125 is fixed for my location, so after doing this there is no need of void magcalMPU9250(float * dest1, float * dest2)  function so you can either comment it out or remove it. Also don't forget to comment out the calling statement as well:

``delay(1000);// Get magnetometer calibration from AK8963 ROMinitAK8963(magCalibration); Serial.println(“AK8963 initialized for active data mode….”); // Initialize device for active mode read of magnetometergetMres();//magcalMPU9250(magBias,magScale);  // commented call statementif(SerialDebug) {//  Serial.println(“Calibration values: “);Serial.print(“X-Axis sensitivity adjustment value “); Serial.println(magCalibration, 2);Serial.print(“Y-Axis sensitivity adjustment value “); Serial.println(magCalibration, 2);Serial.print(“Z-Axis sensitivity adjustment value “); Serial.println(magCalibration, 2);}``

### Filtering

Because the raw data contains a lot of noise we use certain filters on the output of the sensors to convert them to Quaternions (Madgwick/Mahony/Kalman):

``void MadgwickQuaternionUpdate(float ax, float ay, float az, float gx, float gy, float gz, float mx, float my, float mz){float q1 = q, q2 = q, q3 = q, q4 = q;   // short name local variable for readabilityfloat norm;float hx, hy, _2bx, _2bz;float s1, s2, s3, s4;float qDot1, qDot2, qDot3, qDot4;// Auxiliary variables to avoid repeated arithmeticfloat _2q1mx;float _2q1my;float _2q1mz;float _2q2mx;float _4bx;float _4bz;float _2q1 = 2.0f * q1;float _2q2 = 2.0f * q2;float _2q3 = 2.0f * q3;float _2q4 = 2.0f * q4;float _2q1q3 = 2.0f * q1 * q3;float _2q3q4 = 2.0f * q3 * q4;float q1q1 = q1 * q1;float q1q2 = q1 * q2;float q1q3 = q1 * q3;float q1q4 = q1 * q4;float q2q2 = q2 * q2;float q2q3 = q2 * q3;float q2q4 = q2 * q4;float q3q3 = q3 * q3;float q3q4 = q3 * q4;float q4q4 = q4 * q4;// Normalise accelerometer measurementnorm = sqrt(ax * ax + ay * ay + az * az);if (norm == 0.0f) return; // handle NaNnorm = 1.0f/norm;ax *= norm;ay *= norm;az *= norm;// Normalise magnetometer measurementnorm = sqrt(mx * mx + my * my + mz * mz);if (norm == 0.0f) return; // handle NaNnorm = 1.0f/norm;mx *= norm;my *= norm;mz *= norm;// Reference direction of Earth’s magnetic field_2q1mx = 2.0f * q1 * mx;_2q1my = 2.0f * q1 * my;_2q1mz = 2.0f * q1 * mz;_2q2mx = 2.0f * q2 * mx;hx = mx * q1q1 – _2q1my * q4 + _2q1mz * q3 + mx * q2q2 + _2q2 * my * q3 + _2q2 * mz * q4 – mx * q3q3 – mx * q4q4;hy = _2q1mx * q4 + my * q1q1 – _2q1mz * q2 + _2q2mx * q3 – my * q2q2 + my * q3q3 + _2q3 * mz * q4 – my * q4q4;_2bx = sqrt(hx * hx + hy * hy);_2bz = -_2q1mx * q3 + _2q1my * q2 + mz * q1q1 + _2q2mx * q4 – mz * q2q2 + _2q3 * my * q4 – mz * q3q3 + mz * q4q4;_4bx = 2.0f * _2bx;_4bz = 2.0f * _2bz;// Gradient decent algorithm corrective steps1 = -_2q3 * (2.0f * q2q4 – _2q1q3 – ax) + _2q2 * (2.0f * q1q2 + _2q3q4 – ay) – _2bz * q3 * (_2bx * (0.5f – q3q3 – q4q4) + _2bz * (q2q4 – q1q3) – mx) + (-_2bx * q4 + _2bz * q2) * (_2bx * (q2q3 – q1q4) + _2bz * (q1q2 + q3q4) – my) + _2bx * q3 * (_2bx * (q1q3 + q2q4) + _2bz * (0.5f – q2q2 – q3q3) – mz);s2 = _2q4 * (2.0f * q2q4 – _2q1q3 – ax) + _2q1 * (2.0f * q1q2 + _2q3q4 – ay) – 4.0f * q2 * (1.0f – 2.0f * q2q2 – 2.0f * q3q3 – az) + _2bz * q4 * (_2bx * (0.5f – q3q3 – q4q4) + _2bz * (q2q4 – q1q3) – mx) + (_2bx * q3 + _2bz * q1) * (_2bx * (q2q3 – q1q4) + _2bz * (q1q2 + q3q4) – my) + (_2bx * q4 – _4bz * q2) * (_2bx * (q1q3 + q2q4) + _2bz * (0.5f – q2q2 – q3q3) – mz);s3 = -_2q1 * (2.0f * q2q4 – _2q1q3 – ax) + _2q4 * (2.0f * q1q2 + _2q3q4 – ay) – 4.0f * q3 * (1.0f – 2.0f * q2q2 – 2.0f * q3q3 – az) + (-_4bx * q3 – _2bz * q1) * (_2bx * (0.5f – q3q3 – q4q4) + _2bz * (q2q4 – q1q3) – mx) + (_2bx * q2 + _2bz * q4) * (_2bx * (q2q3 – q1q4) + _2bz * (q1q2 + q3q4) – my) + (_2bx * q1 – _4bz * q3) * (_2bx * (q1q3 + q2q4) + _2bz * (0.5f – q2q2 – q3q3) – mz);s4 = _2q2 * (2.0f * q2q4 – _2q1q3 – ax) + _2q3 * (2.0f * q1q2 + _2q3q4 – ay) + (-_4bx * q4 + _2bz * q2) * (_2bx * (0.5f – q3q3 – q4q4) + _2bz * (q2q4 – q1q3) – mx) + (-_2bx * q1 + _2bz * q3) * (_2bx * (q2q3 – q1q4) + _2bz * (q1q2 + q3q4) – my) + _2bx * q2 * (_2bx * (q1q3 + q2q4) + _2bz * (0.5f – q2q2 – q3q3) – mz);norm = sqrt(s1 * s1 + s2 * s2 + s3 * s3 + s4 * s4);    // normalise step magnitudenorm = 1.0f/norm;s1 *= norm;s2 *= norm;s3 *= norm;s4 *= norm;// Compute rate of change of quaternionqDot1 = 0.5f * (-q2 * gx – q3 * gy – q4 * gz) – beta * s1;qDot2 = 0.5f * (q1 * gx + q3 * gz – q4 * gy) – beta * s2;qDot3 = 0.5f * (q1 * gy – q2 * gz + q4 * gx) – beta * s3;qDot4 = 0.5f * (q1 * gz + q2 * gy – q3 * gx) – beta * s4;// Integrate to yield quaternionq1 += qDot1 * deltat;q2 += qDot2 * deltat;q3 += qDot3 * deltat;q4 += qDot4 * deltat;norm = sqrt(q1 * q1 + q2 * q2 + q3 * q3 + q4 * q4);    // normalise quaternionnorm = 1.0f/norm;q = q1 * norm;q = q2 * norm;q = q3 * norm;q = q4 * norm;}// Similar to Madgwick scheme but uses proportional and integral filtering on the error between estimated reference vectors and// measured ones.void MahonyQuaternionUpdate(float ax, float ay, float az, float gx, float gy, float gz, float mx, float my, float mz){float q1 = q, q2 = q, q3 = q, q4 = q;   // short name local variable for readabilityfloat norm;float hx, hy, bx, bz;float vx, vy, vz, wx, wy, wz;float ex, ey, ez;float pa, pb, pc;// Auxiliary variables to avoid repeated arithmeticfloat q1q1 = q1 * q1;float q1q2 = q1 * q2;float q1q3 = q1 * q3;float q1q4 = q1 * q4;float q2q2 = q2 * q2;float q2q3 = q2 * q3;float q2q4 = q2 * q4;float q3q3 = q3 * q3;float q3q4 = q3 * q4;float q4q4 = q4 * q4;// Normalise accelerometer measurementnorm = sqrt(ax * ax + ay * ay + az * az);if (norm == 0.0f) return; // handle NaNnorm = 1.0f / norm;        // use reciprocal for divisionax *= norm;ay *= norm;az *= norm;// Normalise magnetometer measurementnorm = sqrt(mx * mx + my * my + mz * mz);if (norm == 0.0f) return; // handle NaNnorm = 1.0f / norm;        // use reciprocal for divisionmx *= norm;my *= norm;mz *= norm;// Reference direction of Earth’s magnetic fieldhx = 2.0f * mx * (0.5f – q3q3 – q4q4) + 2.0f * my * (q2q3 – q1q4) + 2.0f * mz * (q2q4 + q1q3);hy = 2.0f * mx * (q2q3 + q1q4) + 2.0f * my * (0.5f – q2q2 – q4q4) + 2.0f * mz * (q3q4 – q1q2);bx = sqrt((hx * hx) + (hy * hy));bz = 2.0f * mx * (q2q4 – q1q3) + 2.0f * my * (q3q4 + q1q2) + 2.0f * mz * (0.5f – q2q2 – q3q3);// Estimated direction of gravity and magnetic fieldvx = 2.0f * (q2q4 – q1q3);vy = 2.0f * (q1q2 + q3q4);vz = q1q1 – q2q2 – q3q3 + q4q4;wx = 2.0f * bx * (0.5f – q3q3 – q4q4) + 2.0f * bz * (q2q4 – q1q3);wy = 2.0f * bx * (q2q3 – q1q4) + 2.0f * bz * (q1q2 + q3q4);wz = 2.0f * bx * (q1q3 + q2q4) + 2.0f * bz * (0.5f – q2q2 – q3q3);// Error is cross product between estimated direction and measured direction of gravityex = (ay * vz – az * vy) + (my * wz – mz * wy);ey = (az * vx – ax * vz) + (mz * wx – mx * wz);ez = (ax * vy – ay * vx) + (mx * wy – my * wx);if (Ki > 0.0f){eInt += ex;      // accumulate integral erroreInt += ey;eInt += ez;}else{eInt = 0.0f;     // prevent integral wind upeInt = 0.0f;eInt = 0.0f;}// Apply feedback termsgx = gx + Kp * ex + Ki * eInt;gy = gy + Kp * ey + Ki * eInt;gz = gz + Kp * ez + Ki * eInt;// Integrate rate of change of quaternionpa = q2;pb = q3;pc = q4;q1 = q1 + (-q2 * gx – q3 * gy – q4 * gz) * (0.5f * deltat);q2 = pa + (q1 * gx + pb * gz – pc * gy) * (0.5f * deltat);q3 = pb + (q1 * gy – pa * gz + pc * gx) * (0.5f * deltat);q4 = pc + (q1 * gz + pa * gy – pb * gx) * (0.5f * deltat);// Normalise quaternionnorm = sqrt(q1 * q1 + q2 * q2 + q3 * q3 + q4 * q4);norm = 1.0f / norm;q = q1 * norm;q = q2 * norm;q = q3 * norm;q = q4 * norm;}``

### Data Averaging

As the data changes very rapidly we sample for some amount of time (50 ms) and take the average.

``count = millis();digitalWrite(myLed, !digitalRead(myLed));  // toggle led}}else {// Serial print and/or display at 0.5 s rate independent of data ratesdelt_t = millis() – count;if (delt_t > 50) { // update once per half-second independent of read rateif(SerialDebug) {``

### Extracting Real-World Information

Finally we get the readings in form of yaw, pitch, and roll from the quaternions.

``yaw   = atan2(2.0f * (q * q + q * q), q * q + q * q – q * q – q * q);pitch = -asin(2.0f * (q * q – q * q));roll  = atan2(2.0f * (q * q + q * q), q * q – q * q – q * q + q * q);pitch *= 180.0f / PI;yaw   *= 180.0f / PI;yaw   += 1.34; /* Declination at Potheri, Chennail ,India  Model Used:    IGRF12    HelpLatitude:    12.823640° NLongitude:    80.043518° EDate    Declination2016-04-09    1.34° W  changing by  0.06° E per year (+ve for west )*/roll  *= 180.0f / PI;Serial.print(“Yaw, Pitch, Roll: “);Serial.print(yaw+180, 2);Serial.print(“, “);Serial.print(pitch, 2);Serial.print(“, “);Serial.println(roll, 2);``

### Getting readings from MPU9250 with Arduino  Mega 2560

We have lots of libraries for MPU9250. One of the popular one is given by kriswiner: MPU-9250 Arduino Library by Kriswiner

Once you save the library to your Arduino folder you are ready to go. Open the example `MPU9250BasicAHRS.ino.` Also have this  setup ready:

MPU9250 Breakout ——— Arduino

• VIN ———————- 5V
• SDA ———————– SDA (Pin 20)
• SCL ———————– SCL (Pin 21)
• GND ———————- GND

These wires shouldn't be very long because I2C connections don't work well for long wires.

Now clean up the MPU9250BasicAHRS code. It has LCD code in it, but we don't need it, so remove unnecessary lines. Also I have added a part of auto calibration code. Here is the modified code without unnecessary code and added auto calibration: Github.

Now upload the code to your Arduino and make the connections shown above. Open the Serial Terminal and change the baud rate to 115200. You should see this output:

``MPU92509-DOF 16-bitmotion sensor60 ug LSBMPU9250 I AM 71 I should be 71MPU9250 is online…x-axis self test: acceleration trim within : 0.8% of factory valuey-axis self test: acceleration trim within : -1.9% of factory valuez-axis self test: acceleration trim within : 1.8% of factory valuex-axis self test: gyration trim within : -0.2% of factory valuey-axis self test: gyration trim within : 0.3% of factory valuez-axis self test: gyration trim within : 0.6% of factory valueMPU9250 biasx   y   z254913-660mg1.1-0.11.2o/sMPU9250 initialized for active data mode….AK8963 I AM 48 I should be 48AK8963 initialized for active data mode….Mag Calibration: Wave device in a figure eight until done!``

If you see this:

``MPU92509-DOF 16-bitmotion sensor60 ug LSBMPU9250 I AM FF I should be 71Could not connect to MPU9250: 0xFF``

This means there is definitely a wiring problem (or in the worst case Mpu/arduino fault) try to rectify it before proceeding.

If everything goes well and you see “MPU is online” and “Mag Calibration: Wave device in a figure eight until done!” then everything is working and you should wave your mpu in figure eights until it finishes the auto calibration. After a while you should be getting yaw, pitch, and roll output as below:

``Mag Calibration: Wave device in a figure eight until done!Mag Calibration done!X-Axis sensitivity adjustment value 1.19Y-Axis sensitivity adjustment value 1.19Z-Axis sensitivity adjustment value 1.15AK8963ASAX1.19ASAY1.19ASAZ1.15Yaw, Pitch, Roll: 11.34, 28.62, 50.03Yaw, Pitch, Roll: 20.47, 25.15, 52.88Yaw, Pitch, Roll: 26.94, 19.02, 52.70Yaw, Pitch, Roll: 28.22, 15.02, 50.15Yaw, Pitch, Roll: 27.10, 13.94, 44.68Yaw, Pitch, Roll: 23.11, 13.69, 37.51Yaw, Pitch, Roll: 14.29, 13.22, 27.61Yaw, Pitch, Roll: 357.03, 8.21, 16.72Yaw, Pitch, Roll: 342.29, 0.69, 9.19Yaw, Pitch, Roll: 328.42, -4.80, 3.16Yaw, Pitch, Roll: 317.19, -10.51, -0.58Yaw, Pitch, Roll: 311.88, -16.57, -3.64Yaw, Pitch, Roll: 327.71, -23.45, -16.82Yaw, Pitch, Roll: 325.74, -22.02, -23.51Yaw, Pitch, Roll: 325.99, -28.17, -26.95Yaw, Pitch, Roll: 324.57, -24.96, -23.21Yaw, Pitch, Roll: 320.01, -26.42, -22.25Yaw, Pitch, Roll: 322.50, -26.04, -26.62Yaw, Pitch, Roll: 322.85, -23.43, -29.17Yaw, Pitch, Roll: 323.46, -19.20, -31.48``

Awesome! Now you have the data, and you can play with real time motion!😀

### Auto Azimuth (Yaw) calibration of RTPT using P- controller

We first convert yaw from (-180 to +180) to (0 to 360) by doing:

``yaw = yaw + 180;``

Then we just find the error in yaw using a simple Proportional controller and then add the error back to yaw and then do the servo mappings with the new yaw:

``nyaw = 360 – yaw;      //”yaw” comes from MPU which is “actual”Azim = Azimuth – nyaw;         /*”Azimuth” is the absolute azimuth which  comes    from  calculations from RA and DEC   which assumes our device is already aligned to    North….by doing the subtraction we get the proportional error*/Azim -= 90;        //adding 90° because my titlt servo is mounted at an offset of 90°while (Azim < 0)Azim = 360.0 – abs(Azim);     /*we use the error proportionally for our servo to auto adjust */Azi = map(Azim, 0, 360, 5, 29);Az = (int)Azi;Elev = map(Elevation, -90, 90, 2, 178);El = (int)Elev;``

This completes my RTPT project. Hope you have learned new things from it. 🙂

The final code is in the main RTPT page.

Thank you!😀

## Code

##### Github
https://github.com/kriswiner/MPU-9250
##### Github
https://github.com/shubhampaul/Real_Time_Planet_Tracking_System/tree/master/MPU_fux_BNO_mBias

## Schematics #### Team members ##### Samhita Ganguly
• 4 projects
• 10 followers

• Mpubasicahrs by kriswiner

November 7, 2016

#### Members who respect this project

See similar projects
you might like

#### Visualising 3D Motion of IMU sensor

Project tutorial by Aritro Mukherjee

• 36,350 views
• 44 respects

#### GPS Data Logger, Real-Time Curve, Max Height and Max Speed

Project tutorial by yvesmorele

• 4,627 views
• 28 respects

• 17,434 views
• 86 respects

#### Motion Activated Night Light

Project tutorial by Haziq Afandi

• 6,056 views
• 6 respects

#### Getting started with IMU (6 DOF) motion sensor

Project tutorial by Aritro Mukherjee

• 95,395 views