Balancimg MPU6050 by LEDs on PWM
It is possible to observe the MPU6050 data on serial. If serial termimal is not started then still LED application runs.
There are 4 LEDs on LPC1768. So the first 3 LEDs are assign to accelerometer X, Y and Z. The last LED can drive by user. Default it lights a bit. If you want to turn it off then change the value as "190" to "180" on this line: myled4 = cos(190*2.0*3.13/360) * 0.5 + 0.5; If you want to turn it on (full) then change the value as "190" to "0" on above code line.
Files at revision 0:9a1aae56ed19
Name | Size | Actions |
---|---|---|
[up] | ||
I2Cdev.cpp | 10918 | Revisions Annotate |
I2Cdev.h | 2292 | Revisions Annotate |
MPU6050.cpp | 130478 | Revisions Annotate |
MPU6050.h | 44123 | Revisions Annotate |
helper_3dmath.h | 6637 | Revisions Annotate |
main.cpp | 1111 | Revisions Annotate |
mbed.bld | 65 | Revisions Annotate |