![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
2020/06/09
Revision 0:8d812cab873e, committed 2020-06-08
- Comitter:
- falconsyunya
- Date:
- Mon Jun 08 21:58:30 2020 +0000
- Commit message:
- 2020/06/09
Changed in this revision
diff -r 000000000000 -r 8d812cab873e BMX055.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BMX055.lib Mon Jun 08 21:58:30 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/makidia/code/BMX055/#43c83e461ea4
diff -r 000000000000 -r 8d812cab873e main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Jun 08 21:58:30 2020 +0000 @@ -0,0 +1,18 @@ +#include "mbed.h" +#include "BMX055.h" + +DigitalOut myled(LED1); +BMX055 bmx(PB_7,PB_6);//SDA,SCL +Serial pc(USBTX, USBRX); + +int main() { + while(1) { + bmx.getAcc(); + pc.printf("%2.4lf, %2.4lf, %2.4lf, ",(bmx.accel[0]/512)*9.8,(bmx.accel[1]/512)*9.8,(bmx.accel[2]/512)*9.8); + bmx.getGyro(); + pc.printf("%2.4lf, %2.4lf, %2.4lf, ",(bmx.gyroscope[0]*125)/2048,(bmx.gyroscope[1]*125)/2048,(bmx.gyroscope[2]*125)/2048); + bmx.getMag(); + pc.printf("%2.4lf, %2.4lf, %2.4lf\r\n",bmx.magnet[0],bmx.magnet[1],bmx.magnet[2]); + wait(0); + } +}
diff -r 000000000000 -r 8d812cab873e mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Jun 08 21:58:30 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file