Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: m3pi ADXL345_I2C HMC5583L ITG3200 PCA9547 TLC59116 VL6180x RGB-fun xbee
Diff: lib/vl6180xManager.h
- Revision:
- 0:9f02ae958e20
- Child:
- 4:b2fe3a2545bf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/vl6180xManager.h Thu Dec 03 07:58:50 2015 +0000 @@ -0,0 +1,44 @@ +#pragma once + +#include "mbed.h" +#include "PCA9547.h" +#include "vl6180x.h" + +/*enum DistanceSensor{ + FRONT, + FRONT_RIGHT, + RIGHT, + BACK_RIGHT, + BACK, + BACK_LEFT, + LEFT, + FRONT_LEFT +}; */ + +class VL6180xManager +{ +public: + VL6180xManager(PinName sda, PinName scl); + void select(int index); + int* getAllDistance(int data[]); + +protected: + +/* enum DistanceSensor { + FRONT, + FRONT_RIGHT, + RIGHT, + BACK_RIGHT, + BACK, + BACK_LEFT, + LEFT, + FRONT_LEFT + };*/ + PCA9547 mux; + I2C i2c; + int address; + VL6180x sensor; + + static const int SENSOR_COUNT = 8; + static const int VL6180X_ADDRESS = 0x52; +}; \ No newline at end of file