Simple VL6180x demo for VL6180x Explorer shield with Nucleo F401 adapted from SparkFun example.

Dependents:   VL6180X VL6180X_Explorer VL6180X_Explorer VL6180X ... more

Files at this revision

API Documentation at this revision

Comitter:
highroads
Date:
Fri Jun 17 17:11:04 2016 +0000
Parent:
5:fa7d17a114d2
Commit message:
Change address should change m_addr

Changed in this revision

VL6180x.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/VL6180x.cpp	Fri Jun 17 17:07:43 2016 +0000
+++ b/VL6180x.cpp	Fri Jun 17 17:11:04 2016 +0000
@@ -127,6 +127,7 @@
   if( new_address > 127) return old_address;
    
    VL6180x_setRegister(VL6180X_I2C_SLAVE_DEVICE_ADDRESS, new_address);
+ // mbed needs the new address  
    m_addr=new_address<<1;
    return VL6180x_getRegister(VL6180X_I2C_SLAVE_DEVICE_ADDRESS); 
 }