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.
Revision 0:00f1e085a827, committed 2017-02-20
- Comitter:
- tona0516
- Date:
- Mon Feb 20 07:13:11 2017 +0000
- Commit message:
- Zumipen
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LSM9DS1.lib Mon Feb 20 07:13:11 2017 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/users/tona0516/code/LSM9DS1/#8e17d3584f99
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Feb 20 07:13:11 2017 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+#include "LSM9DS1.h"
+
+Serial pc(USBTX, USBRX);
+LSM9DS1 imu(I2C_SDA0, I2C_SCL0);
+Timer timer;
+AnalogIn Analog1(P0_5);
+AnalogIn Analog2(P0_6);
+int acc[3];
+int gyro[3];
+float strain[2];
+
+int main() {
+ pc.baud(115200);
+ timer.start();
+ while(1){
+ imu.getAcceleroRaw(acc);
+ imu.getGyroRaw(gyro);
+ strain[0] = Analog1.read();
+ strain[1] = Analog2.read();
+ pc.printf("%d,%d,%d,%d,%d,%d,%d,%.5f,%.5f",timer.read_ms(),acc[0],acc[1],acc[2],gyro[0],gyro[1],gyro[2],strain[0],strain[1]);
+ pc.printf("\n");
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Feb 20 07:13:11 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/0ab6a29f35bf \ No newline at end of file