Old working code

Dependencies:   mbed QEI ros_lib_melodic

Revision:
3:a3144a45f44c
Parent:
2:c537f1ebad7b
Child:
4:cb50c6fa340b
--- a/main.cpp	Tue Oct 22 10:05:12 2019 +0000
+++ b/main.cpp	Tue Oct 22 10:09:05 2019 +0000
@@ -21,50 +21,21 @@
     Sensor sensor2(I2C_SDA, I2C_SCL, PC_11);
     Sensor sensor3(I2C_SDA, I2C_SCL, PD_2);
     Sensor sensor4(I2C_SDA, I2C_SCL, PG_3);
- 
-    sensor1.turnOff();
-    sensor2.turnOff();
-    sensor3.turnOff();
-    sensor4.turnOff();
-    wait_ms(0.5);
- 
-    sensor1.turnOff();
-    sensor2.turnOn();
-    sensor3.turnOff();
-    sensor4.turnOff();
-    
+
+    // load settings onto VL6180X sensors 
     sensor2.init();
+    // change default address of sensor 2
     sensor2.changeAddress(addr2);
     
-    sensor3.turnOn();
     sensor3.init();
+    // change default address of sensor 3
     sensor3.changeAddress(addr3);
 
-    sensor4.turnOn();
     sensor4.init();
+    // change default address of sensor 4
     sensor4.changeAddress(addr4);
     
-    sensor1.turnOn();
     sensor1.init();
-    /*
-    // load settings onto VL6180X sensors    
-    VL6180_Init(ADDR1);
-    // change default address of sensor 2
-    WriteByte(0x212, addr2, ADDR1);
-    
-    SHDN_3 = 1;
-    VL6180_Init(ADDR1);
-    // change default address of sensor 3
-    WriteByte(0x212, addr3, ADDR1);
-    
-    SHDN_4 = 1;
-    VL6180_Init(ADDR1);
-    // change default address of sensor 4
-    WriteByte(0x212, addr4, ADDR1);
-    
-    SHDN_1 = 1;
-    VL6180_Init(ADDR1);  
-    */  
   
     while (1)
     {