Skip to content

Commit

Permalink
Merge pull request #1 from davideq/main
Browse files Browse the repository at this point in the history
Add VL53L8CH driver and relative examples
  • Loading branch information
cparata authored Jul 24, 2024
2 parents 213029a + 336cf87 commit 53c4acd
Show file tree
Hide file tree
Showing 24 changed files with 29,279 additions and 1 deletion.
67 changes: 67 additions & 0 deletions .github/workflows/Continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: VL53L8CH Continuous Integration
on:
push:
branches:
- main
paths-ignore:
- '*'
- '**.md'
- '**.txt'
pull_request:
paths-ignore:
- '*'
- '**.md'
- '**.txt'
jobs:
astyle_check:
runs-on: ubuntu-latest
name: AStyle check
steps:
# First of all, clone the repo using the checkout action.
- name: Checkout
uses: actions/checkout@main

- name: Astyle check
id: Astyle
uses: stm32duino/actions/astyle-check@main

# Use the output from the `Astyle` step
- name: Astyle Errors
if: failure()
run: |
cat ${{ steps.Astyle.outputs.astyle-result }}
exit 1
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main

# See: https://github.com/codespell-project/actions-codespell/blob/master/README.md
- name: Spell check
uses: codespell-project/actions-codespell@master
with:
check_filenames: true
check_hidden: true
lib_build:
runs-on: ubuntu-latest
name: Library compilation
steps:

# First of all, clone the repo using the checkout action.
- name: Checkout
uses: actions/checkout@main

- name: Compilation
id: compile
uses: stm32duino/actions/compile-examples@main
with:
board-pattern: "NUCLEO_L476RG"

# Use the output from the `Compilation` step
- name: Compilation Errors
if: failure()
run: |
cat ${{ steps.compile.outputs.compile-result }}
exit 1
61 changes: 60 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,61 @@
# VL53L8CH
Arduino library to support the VL53L8CH artificial intelligence enabler, high performance 8x8 multizone Time-of-Flight (ToF) sensor
Arduino library to support the VL53L8CH Time-of-Flight 8x8 multizone ranging sensor with wide field view.

## API

This sensor uses I2C/SPI to communicate. And I2C/SPI instance is required to access to the sensor.
The APIs provide simple distance measure and multizone detection in both polling and interrupt modes.
The APIs derive from VL53LMZ ULD SDK v1.7.0.

## Examples

The examples contained in this library are based on VL53L8CH-SATEL sensor board.

You need to connect the VL53L8CH-SATEL sensor board directly to the Nucleo board with wires as explained below in the case of I2C communication:
- pin 1 (SPI_I2C_n) of the VL53L8CH satellite connected to pin GND of the Nucleo board
- pin 2 (LPn) of the VL53L8CH satellite connected to pin A3 of the Nucleo board
- pin 3 (NCS) not connected
- pin 4 (MISO) not connected
- pin 5 (MOSI_SDA) of the VL53L8CH satellite connected to pin D14 (SDA) of the Nucleo board
- pin 6 (MCLK_SCL) of the VL53L8CH satellite connected to pin D15 (SCL) of the Nucleo board
- pin 7 (PWREN) of the VL53L8CH satellite connected to pin D11 of the Nucleo board
- pin 8 (I0VDD) of the VL53L8CH satellite not connected
- pin 9 (3V3) of the VL53L8CH satellite connected to 3V3 of the Nucleo board
- pin 10 (1V8) of the VL53L8CH satellite not connected
- pin 11 (5V) of the VL53L8CH satellite not connected
- GPIO1 of VL53L8CH satellite connected to A2 pin of the Nucleo board (not used)
- GND of the VL53L8CH satellite connected to GND of the Nucleo board

You need to connect the VL53L8CH-SATEL sensor board directly to the Nucleo board with wires as explained below in the case of SPI communication:
- pin 1 (SPI_I2C_n) of the VL53L8CH satellite connected to 3V3 of the Nucleo board
- pin 2 (LPn) of the VL53L8CH satellite connected to 3V3 of the Nucleo board
- pin 3 (NCS) of the VL53L8CH satellite connected to pin D10 of the Nucleo board
- pin 4 (MISO) of the VL53L8CH satellite connected to pin D5 of the Nucleo board
- pin 5 (MOSI_SDA) of the VL53L8CH satellite connected to pin D4 (MOSI) of the Nucleo board
- pin 6 (MCLK_SCL) of the VL53L8CH satellite connected to pin D3 (MCLK_SCL) of the Nucleo board
- pin 7 (PWREN) of the VL53L8CH satellite connected to pin D11 of the Nucleo board
- pin 8 (I0VDD) of the VL53L8CH satellite not connected
- pin 9 (3V3) of the VL53L8CH satellite connected to 3V3 of the Nucleo board
- pin 10 (1V8) of the VL53L8CH satellite not connected
- pin 11 (5V) of the VL53L8CH satellite not connected
- GPIO1 of VL53L8CH satellite connected to A2 pin of the Nucleo board (not used)
- GND of the VL53L8CH satellite connected to GND of the Nucleo board

There are 3 examples with the VL53L8CH library:

* VL53L8CH_Sat_HelloWorld_I2C: This example code is to show how to get multizone detection and proximity
values of the VL53L8CH satellite sensor in polling mode using I2C communication.

* VL53L8CH_Sat_HelloWorld_SPI: This example code is to show how to get multizone detection and proximity
values of the VL53L8CH satellite sensor in polling mode using SPI communication.

* VL53L8CH_ThresholdsDetection: This example code is to show how to configure the thresholds detection of the VL53L8CH satellite sensor.


## Documentation

You can find the source files at
https://github.com/stm32duino/VL53L8CH

The VL53L8CH datasheet is available at
https://www.st.com/en/imaging-and-photonics-solutions/VL53L8CH.html
Loading

0 comments on commit 53c4acd

Please sign in to comment.