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 ST Expansion SW Team

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:

  1. on-board VL6180X proximity and ambient light sensor,
  2. up to three additional VL6180X Satellites,
  3. 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();

Arduino Connector Compatibility Warning

Using the X-NUCLEO-6180XA1 expansion board with the NUCLEO-F429ZI requires adopting the following patch:

  • to remove R46 resistor connected to A3 pin;
  • to solder R47 resistor connected to A5 pin.

Alternatively, you can route the Nucleo board’s A5 pin directly to the expansion board’s A3 pin with a wire. In case you patch your expansion board or route the pin, the interrupt signal for the front sensor will be driven on A5 pin rather than on A3 pin.


Example Applications

Files at this revision

API Documentation at this revision

Comitter:
mapellil
Date:
Wed Feb 24 14:51:25 2016 +0000
Parent:
39:3cce4ba37695
Child:
41:2e00362bdb8e
Commit message:
Fixed VL6180X::VL6180x_UpdateByte passing dangling pointer to I2cWrite

Changed in this revision

Components/VL6180X/vl6180x_class.cpp Show annotated file Show diff for this revision Revisions of this file
X_NUCLEO_COMMON.lib Show annotated file Show diff for this revision Revisions of this file
--- a/Components/VL6180X/vl6180x_class.cpp	Mon Jan 18 15:11:01 2016 +0000
+++ b/Components/VL6180X/vl6180x_class.cpp	Wed Feb 24 14:51:25 2016 +0000
@@ -2571,7 +2571,7 @@
    int  status;
    uint8_t buffer;
  
-   status=VL6180x_I2CWrite(Device->I2cAddr, index, (uint8_t *)buffer,(uint8_t)0);
+   status=VL6180x_I2CWrite(Device->I2cAddr, index, (uint8_t *)&buffer,(uint8_t)0);
    if(!status)
    {
       /* read data direct onto buffer */
--- a/X_NUCLEO_COMMON.lib	Mon Jan 18 15:11:01 2016 +0000
+++ b/X_NUCLEO_COMMON.lib	Wed Feb 24 14:51:25 2016 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/teams/ST/code/X_NUCLEO_COMMON/#da29b5403ca1
+https://developer.mbed.org/teams/ST/code/X_NUCLEO_COMMON/#216930edb6b7