harits

Dependencies:   HMC5883L MPU6050 mbed

Files at this revision

API Documentation at this revision

Comitter:
ivanff15
Date:
Fri Jan 10 16:33:11 2014 +0000
Commit message:
nggo harits;

Changed in this revision

HMC5883L.lib Show annotated file Show diff for this revision Revisions of this file
MPU6050.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 4ed117a5e2e2 HMC5883L.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HMC5883L.lib	Fri Jan 10 16:33:11 2014 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/xeta05/code/HMC5883L/#c9ce1eeaf001
diff -r 000000000000 -r 4ed117a5e2e2 MPU6050.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MPU6050.lib	Fri Jan 10 16:33:11 2014 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/Sissors/code/MPU6050/#5c63e20c50f3
diff -r 000000000000 -r 4ed117a5e2e2 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Jan 10 16:33:11 2014 +0000
@@ -0,0 +1,40 @@
+#include "mbed.h"
+#include <stdio.h>
+#include "MPU6050.h"
+
+//persiapan
+Serial pc(USBTX,USBRX);
+MPU6050 acc_gyro(p28,p27);
+I2C i2c(p28,p27);
+//
+
+//deklarasi
+unsigned char ax,ay,az;
+//
+
+//
+char kirim[16];
+//
+
+
+int main()
+{
+//    i2c.frequency(400000);
+//    //acc_gyro.setSleepMode(true);
+//    acc_gyro.setBW(MPU6050_BW_256);
+//    acc_gyro.setI2CBypass(true);
+//    acc_gyro.setAcceleroRange(MPU6050_ACCELERO_RANGE_4G);
+    
+  //  if(acc_gyro.testConnection())pc.printf("sukses");
+//    else pc.printf("coba lagi");
+    while(1)
+    {
+        pc.printf("ivan");
+    //    ax=acc_gyro.getAcceleroRawX();
+//        ay=acc_gyro.getAcceleroRawY();
+//        az=acc_gyro.getAcceleroRawZ();
+//        sprintf(kirim,"%d %d %d",ax,ay,az);
+//        pc.printf(kirim);
+        
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 4ed117a5e2e2 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Jan 10 16:33:11 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9114680c05da