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.
Diff: MPU9250/sample.txt
- Revision:
- 0:eae101ae93c0
diff -r 000000000000 -r eae101ae93c0 MPU9250/sample.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/MPU9250/sample.txt Wed Feb 06 10:54:28 2019 +0000
@@ -0,0 +1,19 @@
+//This is a sample code to get pitch, roll, yaw in degree from MPU9250;
+/*
+#include "mbed.h"
+#include "MPU9250.h"
+
+Serial pc(SERIAL_TX,SERIAL_RX);
+MPU9250 mpu9250(pinSDA,pinSCL,&pc);
+
+int main(void){
+ float degrees[3];
+
+ mpu9250.Initialize();
+
+ while(1){
+ mpu9250.sensingPostureAngle(degrees);
+ Serial.printf("pitch:%f, roll:%f, yaw,%f\n",degrees[0],degrees[1],degrees[2]);
+ }
+}
+*/
\ No newline at end of file