Initial attempt to get ST MEMS working on the device.

Dependencies:   MQTT Nucleo_Sensor_Shield mbed-src mtsas

Fork of YYY_Dragonfly_ST_MEMS by Paul Jaeger

Files at this revision

API Documentation at this revision

Comitter:
BlueShadow
Date:
Tue Oct 20 00:37:18 2015 +0000
Parent:
1:0535928f65ca
Commit message:
Latest mbed source and updated location for mtsas library

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-src.lib Show annotated file Show diff for this revision Revisions of this file
mtsas.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 0535928f65ca -r 26b2e25d323a main.cpp
--- a/main.cpp	Mon Jun 08 20:06:56 2015 +0000
+++ b/main.cpp	Tue Oct 20 00:37:18 2015 +0000
@@ -63,7 +63,7 @@
 //int _port = 1883;
 
 
-#define DATA_INTERVAL 30                                            // delay between samples, could be reduced for quicker response and more data
+#define DATA_INTERVAL 3                                            // delay between samples, could be reduced for quicker response and more data
 
 //void callback(char* topic, char* payload, unsigned int len)
 //{
@@ -77,7 +77,7 @@
 volatile float PRESSURE_Value;
 volatile AxesRaw_TypeDef ACC_Value;
 //volatile float HUMIDITY_Value;
-//volatile AxesRaw_TypeDef MAG_Value;
+volatile AxesRaw_TypeDef MAG_Value;
 //volatile AxesRaw_TypeDef GYR_Value;
 
 int main()
@@ -110,9 +110,9 @@
 
 //    printf("Signal Strength: %d\n\r", radio->getSignalStrength()); //Check the signal strength should be above 8
 
-    printf("data is stored at:\n\r\r");
-    printf("http://longpoll.aercloud.aeris.com/v1/%s/containers/subscriptions/%s/notificationChannels/longPoll?apiKey=%s",_AERCLOUD_ACCOUNT_ID,_AERCLOUD_SUBSCRIPTION_ID,_AERCLOUD_API_KEY);
-    printf(" \n\r \n\r");
+//    printf("data is stored at:\n\r\r");
+//    printf("http://longpoll.aercloud.aeris.com/v1/%s/containers/subscriptions/%s/notificationChannels/longPoll?apiKey=%s",_AERCLOUD_ACCOUNT_ID,_AERCLOUD_SUBSCRIPTION_ID,_AERCLOUD_API_KEY);
+//    printf(" \n\r \n\r");
 
 // If you suspect a connectivity issue, uncomment the code below and if ping works.  If you are not getting a
 //  valid ping, there's a connectivity problem.  First step is to verify you've got the right APN set
@@ -152,7 +152,7 @@
     mems_expansion_board->lps25h.GetPressure((float *)&PRESSURE_Value);
     mems_expansion_board->lsm6ds0.Acc_GetAxes((AxesRaw_TypeDef *)&ACC_Value);
 //        mems_expansion_board->hts221.GetHumidity((float *)&HUMIDITY_Value);
-//        mems_expansion_board->lis3mdl.GetAxes((AxesRaw_TypeDef *)&MAG_Value);
+        mems_expansion_board->lis3mdl.GetAxes((AxesRaw_TypeDef *)&MAG_Value);
 //        mems_expansion_board->lsm6ds0.Gyro_GetAxes((AxesRaw_TypeDef *)&GYR_Value);
 
 
@@ -161,7 +161,7 @@
         printf("Pressure:\t\t %f hPa\r\n", PRESSURE_Value);
         printf("Accelerometer (mg):\t X: %d, Y: %d, Z: %d\r\n", ACC_Value.AXIS_X, ACC_Value.AXIS_Y, ACC_Value.AXIS_Z);
 //        printf("Humidity:\t\t %f%%\r\n", HUMIDITY_Value);
-//        printf("Magnetometer (mGauss):\t mX: %d, mY: %d, mZ: %d\r\n", MAG_Value.AXIS_X, MAG_Value.AXIS_Y, MAG_Value.AXIS_Z);
+        printf("Magnetometer (mGauss):\t mX: %d, mY: %d, mZ: %d\r\n", MAG_Value.AXIS_X, MAG_Value.AXIS_Y, MAG_Value.AXIS_Z);
 //        printf("Gyroscope (mdps):\t X: %d, Y: %d, Z: %d\r\n", GYR_Value.AXIS_X, GYR_Value.AXIS_Y, GYR_Value.AXIS_Z);
         printf("\r\n");
 
diff -r 0535928f65ca -r 26b2e25d323a mbed-src.lib
--- a/mbed-src.lib	Mon Jun 08 20:06:56 2015 +0000
+++ b/mbed-src.lib	Tue Oct 20 00:37:18 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed-src/#a5bce224b5d8
+http://mbed.org/users/mbed_official/code/mbed-src/#a11c0372f0ba
diff -r 0535928f65ca -r 26b2e25d323a mtsas.lib
--- a/mtsas.lib	Mon Jun 08 20:06:56 2015 +0000
+++ b/mtsas.lib	Tue Oct 20 00:37:18 2015 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/teams/Multi-Hackers/code/mtsas/#efa4a5981370
+http://developer.mbed.org/teams/MultiTech/code/mtsas/#1667a524c7a3