stm32f103c8t6 with w5500 push cayenne

Files at this revision

API Documentation at this revision

Comitter:
dadangjia
Date:
Mon Apr 23 13:43:08 2018 +0000
Parent:
6:5b90f2b5e6d9
Commit message:
STM32F103C8T6?BME280?MPU6050?SSD1306?W5500?CAYENNE

Changed in this revision

MPU6050.cpp Show annotated file Show diff for this revision Revisions of this file
MPU6050.h Show annotated file Show diff for this revision Revisions of this file
--- a/MPU6050.cpp	Wed Aug 05 13:15:07 2015 +0000
+++ b/MPU6050.cpp	Mon Apr 23 13:43:08 2018 +0000
@@ -34,7 +34,7 @@
 //I2C i2c(p9,p10);         // setup i2c (SDA,SCL)  
 
 /* For NUCLEO-F411RE board */
-static I2C i2c(D14,D15);         // setup i2c (SDA,SCL)
+static I2C i2c(PB_9, PB_8);         // setup i2c (SDA,SCL)
 
 /* Set initial input parameters */
 
@@ -147,12 +147,10 @@
     if(whoAmI==0x68)
     {
         pc.printf("MPU6050 is online... \r\n");  
-        led2=1;
     }
     else
     {
         pc.printf("Could not connect to MPU6050 \r\nCheck the connections... \r\n");  
-        toggler1.attach(&toggle_led1,0.1);     // toggles led1 every 100 ms
     }  
 }
 
--- a/MPU6050.h	Wed Aug 05 13:15:07 2015 +0000
+++ b/MPU6050.h	Mon Apr 23 13:43:08 2018 +0000
@@ -31,15 +31,12 @@
 #include "MPU6050RegDef.h"
 
 #define PI 3.14159265359    // This value will be used when calculating angles
-#define dt 0.005            // 200 Hz sampling period
+#define dt 0.02            // 20 Hz sampling period
 
 extern float aRes, gRes; 
 
 /* whoAmI func uses this func, variables etc */
-extern Ticker toggler1;  
 extern Serial pc;   
-extern DigitalOut led2;
-extern void toggle_led1();
 
 /* Sensor datas to be used in program */
 extern float ax,ay,az;