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.
Dependencies: mbed BMI160 max32630fthr
Revision 12:c5e42cadd5d9, committed 2021-12-29
- Comitter:
- walterluu
- Date:
- Wed Dec 29 06:50:39 2021 +0000
- Parent:
- 11:23538d47ba82
- Commit message:
- Example;
Changed in this revision
--- a/BMI160.lib Fri Nov 17 21:52:14 2017 +0000 +++ b/BMI160.lib Wed Dec 29 06:50:39 2021 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/teams/MaximIntegrated/code/BMI160/#4949e9b15b6e +https://developer.mbed.org/teams/MaximIntegrated/code/BMI160/#a521606048bb
--- a/main.cpp	Fri Nov 17 21:52:14 2017 +0000
+++ b/main.cpp	Wed Dec 29 06:50:39 2021 +0000
@@ -32,7 +32,7 @@
 
 
 #include "mbed.h"
-//#include "max32630fthr.h"
+#include "max32630fthr.h"
 #include "bmi160.h"
 
 
@@ -45,10 +45,27 @@
 {
     //MAX32630FTHR pegasus(MAX32630FTHR::VIO_3V3);
     
-    DigitalOut rLED(LED1, LED_OFF);
-    DigitalOut gLED(LED2, LED_OFF);
-    DigitalOut bLED(LED3, LED_OFF);
+    DigitalOut rLED(LED1, LED_ON);
+    DigitalOut gLED(LED2, LED_ON);
+    DigitalOut bLED(LED3, LED_ON);
     
+    //for(int i = 0; i < 10; i++) 
+//    {
+//        
+//        rLED = 1;
+//        wait(1.0);
+//        rLED = 0;
+//        wait(1.0);
+//        
+//        printf("Blinking time %d \n", i);
+//        
+//        }
+//    
+//    rLED = 0;
+//    bLED = 1;
+//    
+//    printf("The end");
+//    
     I2C i2cBus(P5_7, P6_0);
     i2cBus.frequency(400000);
     BMI160_I2C imu(i2cBus, BMI160_I2C::I2C_ADRS_SDO_LO);
@@ -74,7 +91,7 @@
     
     
     BMI160::AccConfig accConfig;
-    //example of using getSensorConfig
+//    example of using getSensorConfig
     if(imu.getSensorConfig(accConfig) == BMI160::RTN_NO_ERROR)
     {
         printf("ACC Range = %d\n", accConfig.range);
@@ -88,7 +105,7 @@
         failures++;
     }
     
-    //example of setting user defined configuration
+//    example of setting user defined configuration
     accConfig.range = BMI160::SENS_4G;
     accConfig.us = BMI160::ACC_US_OFF;
     accConfig.bwp = BMI160::ACC_BWP_2;
@@ -125,7 +142,7 @@
     
     if(failures == 0)
     {
-        float imuTemperature; 
+//        flo//at imuTemperature; 
         BMI160::SensorData accData;
         BMI160::SensorData gyroData;
         BMI160::SensorTime sensorTime;
--- a/max32630fthr.lib Fri Nov 17 21:52:14 2017 +0000 +++ b/max32630fthr.lib Wed Dec 29 06:50:39 2021 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/teams/MaximIntegrated/code/max32630fthr/#9eb360063579 +https://developer.mbed.org/teams/MaximIntegrated/code/max32630fthr/#8f6e6a800f2f
--- a/mbed.bld Fri Nov 17 21:52:14 2017 +0000 +++ b/mbed.bld Wed Dec 29 06:50:39 2021 +0000 @@ -1,1 +1,1 @@ -https://os.mbed.com/users/mbed_official/code/mbed/builds/e7ca05fa8600 \ No newline at end of file +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file