Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BMX055
main.cpp@1:630fac09c3bd, 2019-12-10 (annotated)
- Committer:
- yasunorihirakawa
- Date:
- Tue Dec 10 04:10:35 2019 +0000
- Revision:
- 1:630fac09c3bd
- Parent:
- 0:532ef32974cf
BMX055
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Arima | 0:532ef32974cf | 1 | #include "mbed.h" |
| yasunorihirakawa | 1:630fac09c3bd | 2 | #include "BMX055.h" |
| Arima | 0:532ef32974cf | 3 | |
| yasunorihirakawa | 1:630fac09c3bd | 4 | BMX055 bmx(D0,D1); |
| yasunorihirakawa | 1:630fac09c3bd | 5 | |
| Arima | 0:532ef32974cf | 6 | int main() |
| Arima | 0:532ef32974cf | 7 | { |
| yasunorihirakawa | 1:630fac09c3bd | 8 | //bmx.mag_calibration(); |
| yasunorihirakawa | 1:630fac09c3bd | 9 | bmx.acc_calibration(); |
| yasunorihirakawa | 1:630fac09c3bd | 10 | /* |
| yasunorihirakawa | 1:630fac09c3bd | 11 | while(1) |
| yasunorihirakawa | 1:630fac09c3bd | 12 | { |
| yasunorihirakawa | 1:630fac09c3bd | 13 | bmx.Get_acc(); |
| yasunorihirakawa | 1:630fac09c3bd | 14 | printf("ACC: %+9.4f, %+9.4f, %+9.4f\r\n", bmx.accel[0], bmx.accel[1], bmx.accel[2]); |
| yasunorihirakawa | 1:630fac09c3bd | 15 | bmx.Get_gyro(); |
| yasunorihirakawa | 1:630fac09c3bd | 16 | printf("GYRO: %+9.4f, %+9.4f, %+9.4f\r\n",bmx.gyroscope[0]*125/2048,bmx.gyroscope[1]*125/2048,bmx.gyroscope[2]*125/2048); |
| yasunorihirakawa | 1:630fac09c3bd | 17 | bmx.Get_mag(); |
| yasunorihirakawa | 1:630fac09c3bd | 18 | printf("MAG: %+9.4f, %+9.4f, %+9.4f\r\n",bmx.magnet[0],bmx.magnet[1],bmx.magnet[2]); |
| yasunorihirakawa | 1:630fac09c3bd | 19 | printf("\n"); |
| yasunorihirakawa | 1:630fac09c3bd | 20 | |
| yasunorihirakawa | 1:630fac09c3bd | 21 | wait(0.5); |
| yasunorihirakawa | 1:630fac09c3bd | 22 | }*/ |
| Arima | 0:532ef32974cf | 23 | } |