Dependencies: mbed ros_lib_kinetic
Diff: main.cpp
- Revision:
- 8:a936ec892d87
- Parent:
- 7:c5017af4c555
- Child:
- 9:2b469b23c42d
--- a/main.cpp Thu Oct 17 11:50:52 2019 +0000 +++ b/main.cpp Thu Oct 17 12:12:03 2019 +0000 @@ -137,7 +137,7 @@ { status = ReadByte(0x04f,addr); range_status = status & 0x07; - wait_ms(1); // (can be removed) + //wait_ms(50); // (can be removed) } return 0; @@ -217,23 +217,23 @@ // poll the VL6180 till new sample ready VL6180_Start_Range(ADDR1); - VL6180_Poll_Range(ADDR1); + //VL6180_Poll_Range(ADDR1); range1 = VL6180_Read_Range(ADDR1); VL6180_Clear_Interrupts(ADDR1); - + wait_ms(10); // read range result VL6180_Start_Range(ADDR2); VL6180_Poll_Range(ADDR2); range2 = VL6180_Read_Range(ADDR2); VL6180_Clear_Interrupts(ADDR2); - + wait_ms(10); VL6180_Start_Range(ADDR3); VL6180_Poll_Range(ADDR3); range3 = VL6180_Read_Range(ADDR3); VL6180_Clear_Interrupts(ADDR3); - + wait_ms(10); VL6180_Start_Range(ADDR4); - VL6180_Poll_Range(ADDR4); + //VL6180_Poll_Range(ADDR4); range4 = VL6180_Read_Range(ADDR4); VL6180_Clear_Interrupts(ADDR4); // clear the interrupt on VL6180