This is lab2 of 4180 dealing with the extra parts kit.

Dependencies:   mbed LSM9DS1_Library_cal

Revision:
7:ef9f3c067efd
Parent:
6:713054b45e91
Child:
8:ac38b8f1190d
diff -r 713054b45e91 -r ef9f3c067efd Jesses_Lab2/Jesses_Main.cpp
--- a/Jesses_Lab2/Jesses_Main.cpp	Fri Feb 12 18:33:24 2016 +0000
+++ b/Jesses_Lab2/Jesses_Main.cpp	Fri Feb 12 18:34:42 2016 +0000
@@ -24,51 +24,53 @@
 //}
 // --------------------------------------------------------------------------------
 
-// Sharp IR sensor
-
-Serial pc(USBTX, USBRX);
-
-AnalogIn sensor(p15);
-DigitalOut led1(LED1);
-DigitalOut led2(LED2);
-DigitalOut led3(LED3);
-DigitalOut led4(LED4);
-
-int main(){
-  while(1){
+//// Sharp IR sensor complete
+//
+//Serial pc(USBTX, USBRX);
+//
+//AnalogIn sensor(p15);
+//DigitalOut led1(LED1);
+//DigitalOut led2(LED2);
+//DigitalOut led3(LED3);
+//DigitalOut led4(LED4);
+//
+//int main(){
+//  while(1){
+//
+//     if(sensor > 0.61){
+//       led1 = 1;
+//       led2 = 1;
+//       led3 = 1;
+//       led4 = 1;
+//     }
+//     else if(sensor > 0.46){
+//       led1 = 1;
+//       led2 = 1;
+//       led3 = 1;
+//       led4 = 0;
+//     }
+//     else if(sensor > 0.30){
+//       led1 = 1;
+//       led2 = 1;
+//       led3 = 0;
+//       led4 = 0;
+//     }
+//     else if(sensor > 0.15){
+//       led1 = 1;
+//       led2 = 0;
+//       led3 = 0;
+//       led4 = 0;
+//     }
+//     else{
+//       led1 = 0;
+//       led2 = 0;
+//       led3 = 0;
+//       led4 = 0;
+//     }
+//
+////    pc.printf("%f\n", sensor.read());
+////    wait(.5);
+//  }
+//}
+// --------------------------------------------------------------------------------
 
-     if(sensor > 0.61){
-       led1 = 1;
-       led2 = 1;
-       led3 = 1;
-       led4 = 1;
-     }
-     else if(sensor > 0.46){
-       led1 = 1;
-       led2 = 1;
-       led3 = 1;
-       led4 = 0;
-     }
-     else if(sensor > 0.30){
-       led1 = 1;
-       led2 = 1;
-       led3 = 0;
-       led4 = 0;
-     }
-     else if(sensor > 0.15){
-       led1 = 1;
-       led2 = 0;
-       led3 = 0;
-       led4 = 0;
-     }
-     else{
-       led1 = 0;
-       led2 = 0;
-       led3 = 0;
-       led4 = 0;
-     }
-
-//    pc.printf("%f\n", sensor.read());
-//    wait(.5);
-  }
-}