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: mbed MPU6050_testAAAAAAAAAAAAA
main.cpp@3:0c4d924ea29b, 2021-05-08 (annotated)
- Committer:
- Satoshisatoshi
- Date:
- Sat May 08 02:45:22 2021 +0000
- Revision:
- 3:0c4d924ea29b
- Parent:
- 2:6e9393d9cc11
AAAAAAAAAAAAAA
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ritarosakai | 0:5efae55d7fbb | 1 | #include "mbed.h" |
ritarosakai | 0:5efae55d7fbb | 2 | #include "MPU6050.h" |
ritarosakai | 0:5efae55d7fbb | 3 | |
Satoshisatoshi | 3:0c4d924ea29b | 4 | MPU6050 mpu1(p9,p10,0x68); |
Satoshisatoshi | 3:0c4d924ea29b | 5 | //MPU6050 mpu2(p9,p10,0x69); |
ritarosakai | 0:5efae55d7fbb | 6 | Serial pc(USBTX,USBRX); |
ritarosakai | 0:5efae55d7fbb | 7 | |
ritarosakai | 0:5efae55d7fbb | 8 | float gx,gy,gz,ax,ay,az; |
ritarosakai | 0:5efae55d7fbb | 9 | |
ritarosakai | 0:5efae55d7fbb | 10 | int main() |
ritarosakai | 0:5efae55d7fbb | 11 | { |
Satoshisatoshi | 3:0c4d924ea29b | 12 | pc.baud(9600); |
Satoshisatoshi | 3:0c4d924ea29b | 13 | |
Satoshisatoshi | 3:0c4d924ea29b | 14 | mpu1.start(); |
Satoshisatoshi | 3:0c4d924ea29b | 15 | // mpu2.start(); |
Satoshisatoshi | 3:0c4d924ea29b | 16 | while(1) { |
Satoshisatoshi | 3:0c4d924ea29b | 17 | mpu1.read(&gx,&gy,&gz,&ax,&ay,&az); |
Satoshisatoshi | 3:0c4d924ea29b | 18 | pc.printf("ax,ay,az %.2f,%.2f,%.2f\r\n",ax,ay,az); |
Satoshisatoshi | 3:0c4d924ea29b | 19 | // mpu2.read(&gx,&gy,&gz,&ax,&ay,&az); |
Satoshisatoshi | 3:0c4d924ea29b | 20 | // pc.printf(" ax,ay,az %.2f,%.2f,%.2f\r\n",ax,ay,az); |
ritarosakai | 0:5efae55d7fbb | 21 | wait(1); |
ritarosakai | 0:5efae55d7fbb | 22 | } |
ritarosakai | 1:01af59327884 | 23 | } |