Hello World edited

Dependencies:   mbed BMI160 max32630fthr

Revision:
12:1a0142dd9994
Parent:
10:9882df01637d
--- a/main.cpp	Fri Nov 17 21:52:14 2017 +0000
+++ b/main.cpp	Wed Dec 29 06:58:49 2021 +0000
@@ -53,8 +53,9 @@
     i2cBus.frequency(400000);
     BMI160_I2C imu(i2cBus, BMI160_I2C::I2C_ADRS_SDO_LO);
     
-    printf("\033[H");  //home
-    printf("\033[0J");  //erase from cursor to end of screen
+//    printf("\033[H");  //home
+//    printf("\033[0J");  //erase from cursor to end of screen
+
     
     uint32_t failures = 0;
     
@@ -120,44 +121,63 @@
     }
     
     wait(1.0);
-    printf("\033[H");  //home
-    printf("\033[0J");  //erase from cursor to end of screen
+//    printf("\033[H");  //home
+//    printf("\033[0J");  //erase from cursor to end of screen
     
-    if(failures == 0)
-    {
-        float imuTemperature; 
-        BMI160::SensorData accData;
-        BMI160::SensorData gyroData;
-        BMI160::SensorTime sensorTime;
         
-        while(1)
-        {
-            imu.getGyroAccXYZandSensorTime(accData, gyroData, sensorTime, accConfig.range, gyroConfig.range);
-            imu.getTemperature(&imuTemperature);
-            
-            printf("ACC xAxis = %s%4.3f\n", "\033[K", accData.xAxis.scaled);
-            printf("ACC yAxis = %s%4.3f\n", "\033[K", accData.yAxis.scaled);
-            printf("ACC zAxis = %s%4.3f\n\n", "\033[K", accData.zAxis.scaled);
-            
-            printf("GYRO xAxis = %s%5.1f\n", "\033[K", gyroData.xAxis.scaled);
-            printf("GYRO yAxis = %s%5.1f\n", "\033[K", gyroData.yAxis.scaled);
-            printf("GYRO zAxis = %s%5.1f\n\n", "\033[K", gyroData.zAxis.scaled);
-            
-            printf("Sensor Time = %s%f\n", "\033[K", sensorTime.seconds);
-            printf("Sensor Temperature = %s%5.3f\n", "\033[K", imuTemperature);
-            
-            printf("\033[H");  //home
-            gLED = !gLED;
-        }
-    }
-    else
-    {
-        while(1)
-        {
-            rLED = !rLED;
-            wait(0.25);
-        }
-    }
+    bLED = !bLED;
+    wait(5);
+    printf("Hello World!!\n");
+    wait(3);
+    printf("Testing");
+    wait(5);
+    bLED = !bLED;
+    
+  //  while (1) {
+//        for (int i = 0; i < 5; i++) {
+//        printf("Hello World!!\n");
+//        printf("Testing");
+//    //    rLED = !rLED;
+//        gLED = !gLED;
+//        }
+//    }
+    
+    
+ //   if(failures == 0)
+//    {
+//        float imuTemperature; 
+//        BMI160::SensorData accData;
+//        BMI160::SensorData gyroData;
+//        BMI160::SensorTime sensorTime;
+//        
+//        while(1)
+//        {
+//            imu.getGyroAccXYZandSensorTime(accData, gyroData, sensorTime, accConfig.range, gyroConfig.range);
+//            imu.getTemperature(&imuTemperature);
+//            
+//            printf("ACC xAxis = %s%4.3f\n", "\033[K", accData.xAxis.scaled);
+//            printf("ACC yAxis = %s%4.3f\n", "\033[K", accData.yAxis.scaled);
+//            printf("ACC zAxis = %s%4.3f\n\n", "\033[K", accData.zAxis.scaled);
+//            
+//            printf("GYRO xAxis = %s%5.1f\n", "\033[K", gyroData.xAxis.scaled);
+//            printf("GYRO yAxis = %s%5.1f\n", "\033[K", gyroData.yAxis.scaled);
+//            printf("GYRO zAxis = %s%5.1f\n\n", "\033[K", gyroData.zAxis.scaled);
+//            
+//            printf("Sensor Time = %s%f\n", "\033[K", sensorTime.seconds);
+//            printf("Sensor Temperature = %s%5.3f\n", "\033[K", imuTemperature);
+//            
+//            printf("\033[H");  //home
+//            gLED = !gLED;
+//        }
+//    }
+//    else
+//    {
+//        while(1)
+//        {
+//            rLED = !rLED;
+//            wait(0.25);
+//        }
+//    }
 }