embeddingcpp/content/posts/007-stm32begin-006-tofs.md
erki 9a6bb39669
All checks were successful
Build and push latest / publish (push) Successful in 1m19s
Add 005
2024-11-12 20:00:02 +02:00

922 B

title date draft summary author series tags
STM32 For Beginners [6]: Time of Flight Sensors 2024-10-11T00:36:00+03:00 false ... Rusted Skull
STM32 For Beginners
Embedded
STM32

{{< figure src="https://www.smart-prototyping.com/image/cache/data/2020/10/102076%20VL53L1X/3-750x750.JPG" caption="Source: www.smart-prototyping.com" >}}

Connection scheme:

Sensor Nucleo
VIN 3V3
GND GND
SCL D5 (PB6)
SDA D4 (PB7)
GPIO1 NC
XSHUT D6 (PB1)

Steps:

  • Enable i2c1. Do not modify the pins or anything.
  • Set PB1 as GPIO output.
  • Under the "Project Manager" tab, go to "Code Generator", and put a checkmark next to "Generate peripheral initialization as a pair of '.c/.h files per peripheral" box.
  • Save the .ioc file, generate code.

Driver link: https://gitlab.com/KevinAljas/vl53l1x-stm32-hal-driver