integrated sensor stand alone code used for int. test 2

Dependencies:   mbed

Fork of Totalpni by saikiran cholleti

Files at this revision

API Documentation at this revision

Comitter:
sakthipriya
Date:
Fri Feb 13 15:36:14 2015 +0000
Parent:
0:b2d4134279d4
Commit message:
integrated sensor stand alone code used for int. test 2

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r b2d4134279d4 -r 21fc0c5bafb2 main.cpp
--- a/main.cpp	Wed Feb 04 15:55:52 2015 +0000
+++ b/main.cpp	Fri Feb 13 15:36:14 2015 +0000
@@ -1,7 +1,7 @@
 #include<mbed.h>
 #include "pni.h" //pni header file
 Serial pc(USBTX,USBRX); //for usb communication
-I2C i2c (PTC2,PTC1); //PTC2-sda,PTC1-scl
+I2C i2c (PTC9,PTC8); //PTC2-sda,PTC1-scl
 void INIT_PNI(void); //initialization of registers happens
 float *EXECUTE_PNI(); //data is obtained
 void T_OUT(); //timeout function to stop infinite loop
@@ -95,7 +95,7 @@
         i2c.write(SLAVE_ADDR,cmd,1);
         i2c.read(SLAVE_ADDR_READ,&status,1);
         wait_ms(100);
-        //pc.printf("\nEvent Status is %x\n",(int)status);
+        pc.printf("\nEvent Status is %x\n",(int)status);
         //if the 6th and 4th bit are 1 then it implies that gyro and magnetometer values are ready to take
         if(((int)status&40)==40) {
             cmd[0]=GYRO_XOUT_H; //0x22 gyro LSB of x