Team Alpha / Mbed 2 deprecated Accelerometer_gyro

Dependencies:   mbed

Fork of testing_gyro by Dimitar Borisov

Revision:
2:2ef63ab235bf
Parent:
1:3b2260aff305
Child:
3:95fecaa76b4a
--- a/main.cpp	Tue Mar 18 16:48:10 2014 +0000
+++ b/main.cpp	Tue Mar 18 17:29:44 2014 +0000
@@ -72,14 +72,14 @@
     writeByte(LSM303_a,aCTRL_REG4_A ,0x08); // Set full scale to +/- 2g sensitivity and high rez mode
 #endif
 
-#ifdef LPS331
+#ifdef LPS331_on
     // LPS331 Pressure sensor
     pc.printf("LPS331 ping (should reply 0xBB): %x \n",readByte(LPS331addr,pWHO_AM_I));
     writeByte(LPS331addr,pCTRL_REG1,0x90);  // Switch on pressure sensor and select 1Hz ODR. If you select one-shot then sensor powers itself down after every reading...
     writeByte(LPS331addr,pRES_CONF,0x70);   // Temp and pressure noise reduction. Sets # of internal measurements that are averaged to 1 reading. Default is 0x7A (temp rez=128, press=512)
 #endif
 
-#ifdef L3GD20
+#ifdef L3GD20_on
     // L3GD20 gyro
     printf("Ping L3GD20 (should reply 0xD4): %x \n",readByte(L3GD20_ADDR,gWHO_AM_I));
     writeByte(L3GD20_ADDR,gCTRL_REG1,0x0F); // Set ODR to 95Hz, BW to 12.5Hz, enable axes and turn on device
@@ -223,7 +223,7 @@
     LSM303(&state);
 #endif
 
-#ifdef L3GD20
+#ifdef L3GD20_on
     L3GD20();
 #endif