Library to handle the X-NUCLEO-6180XA1 Proximity and ambient light sensor expansion board based on VL6180X.
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
Dependents: HelloWorld_6180XA1 SunTracker_BLE Servo_6180XA1 BLE_HR_Light ... more
Fork of X_NUCLEO_6180XA1 by
You are viewing an older revision! See the latest version
Homepage
X-NUCLEO-6180XA1 Proximity and Ambient Light Sensor Expansion Board Firmware Package¶
Introduction¶
This firmware package includes Components Device Drivers and Board Support Package for STMicroelectronics' X-NUCLEO-6180XA1 Proximity and ambient light sensor expansion board based on VL6180X.
Firmware Library¶
Class X_NUCLEO_6180XA1 is intended to represent the Proximity and ambient light sensor expansion board with the same name.
The expansion board is providing the support of the following components:
- on-board VL6180X proximity and ambient light sensor,
- up to three additional VL6180X Satellites,
- on-board 4-digit display
It is intentionally implemented as a singleton because only one X-NUCLEO-VL6180XA1 at a time might be deployed in a HW component stack. In order to get the singleton instance you have to call class method `Instance()`, e.g.:
// Sensors expansion board singleton instance static X_NUCLEO_6180XA1 *6180X_expansion_board = X_NUCLEO_6180XA1::Instance();
Example Applications¶
Arduino Connector Compatibility Warning
X-NUCLEO-IHM02A1 is Arduino compatible with one exception: instead of using D13
pin to drive the SPI clock, it uses D3
pin, hence the default configuration for this library is with the SPI clock on D3
pin.
To be fully Arduino compatible the following patch is required:
- to remove the
SB34
resistor; - to solder the
SB12
resistor.
Alternatively, you can route the Nucleo board’s D13
pin directly to the expansion board’s D3
pin with a wire.
In case you patch your expansion board or route the pin, the SPI clock will be driven on D13
pin rather than on D3
pin, and you have also to initialize the sclk PinName variable with D13
rather than D3
.
This patch is known to be required, for example, on the following boards: NUCLEO-F103RB
, NUCLEO-F302RB
, NUCLEO-F411RE
, and NUCLEO-F429ZI
.
If you use D13
pin for the SPI clock, please be aware that on STM32 Nucleo boards you may not drive the LED, otherwise you will get a conflict: the LED on STM32 Nucleo boards is connected to the D13
pin.