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.
Fork of Totalpni by
Diff: main.cpp
- Revision:
- 1:21fc0c5bafb2
- Parent:
- 0:b2d4134279d4
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
