Mirror with some correction
Dependencies: mbed FastIO FastPWM USBDevice
Diff: VL6180X/VL6180X.cpp
- Revision:
- 85:3c28aee81cde
- Parent:
- 82:4f6209cb5c33
- Child:
- 87:8d35c74403af
--- a/VL6180X/VL6180X.cpp Thu Apr 13 23:27:59 2017 +0000 +++ b/VL6180X/VL6180X.cpp Fri Apr 14 17:56:54 2017 +0000 @@ -13,6 +13,7 @@ distMode = 0; // initially reset the sensor + gpio0Pin.output(); gpio0Pin.write(0); } @@ -23,11 +24,12 @@ bool VL6180X::init() { // hold reset low for 10ms + gpio0Pin.output(); gpio0Pin.write(0); wait_us(10000); // release reset to allow the sensor to reboot - gpio0Pin.write(1); + gpio0Pin.input(); wait_us(10000); // reset the I2C bus