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: main.cpp
- Revision:
- 0:aa6206a1d0c3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Apr 09 17:23:50 2014 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+#include "imu.h"
+
+DigitalOut mbled1(LED1);
+Serial pc(USBTX, USBRX);
+
+IMU imu;
+
+int main()
+{
+ pc.baud(115200);
+ wait(2);
+ imu.zeroGyroZ();
+ imu.startPolling();
+
+ while(1) {
+ wait(0.05);
+ pc.printf("%.2f\n", imu.getDegZ());
+ }
+}
\ No newline at end of file