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.
mbed.bld@0:9a1aae56ed19, 2013-10-13 (annotated)
- Committer:
- LORDTEK
- Date:
- Sun Oct 13 12:01:33 2013 +0000
- Revision:
- 0:9a1aae56ed19
Balancing MPU6050 by LEDs
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
LORDTEK | 0:9a1aae56ed19 | 1 | http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f |