Sample Program for Maker Faire Tokyo 2017
Dependencies: X_NUCLEO_6180XA1 mbed
Fork of HelloWorld_6180XA1 by
Diff: main.cpp
- Revision:
- 7:865f0c23a183
- Parent:
- 6:f253ca7919af
- Child:
- 8:4c05f7a5bb60
--- a/main.cpp Tue Sep 29 14:51:10 2015 +0200 +++ b/main.cpp Tue Sep 29 15:39:05 2015 +0200 @@ -68,13 +68,16 @@ //STMPE1600DigiOut * p_exp = new STMPE1600DigiOut(device_i2c, GPIO_12, STMPE1600_DEF_DEVICE_ADDRESS); VL6180X sensor1(device_i2c, gpio12); - + + sensor1.VL6180x_Off(); sensor1.VL6180x_On(); // tmp = sensor1.Init(); - uint8_t id=0; + static uint8_t id=0; id = sensor1.ReadID(); // read id to test - + sensor1.VL6180x_SetI2CAddress(sensor1.DevData, 0x10); + id=0; + id = sensor1.ReadID(); // read id to test // VL6180X sensor1(device_i2c, exp);