From 81fb12b8217d35432bc5e8e6564f5aa1ea8de78b Mon Sep 17 00:00:00 2001 From: Erki Date: Wed, 9 Oct 2024 19:54:26 +0300 Subject: [PATCH] Temporary outline going live --- content/posts/006-stm32begin-005-tofs.md | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 content/posts/006-stm32begin-005-tofs.md diff --git a/content/posts/006-stm32begin-005-tofs.md b/content/posts/006-stm32begin-005-tofs.md new file mode 100644 index 0000000..64cc4f2 --- /dev/null +++ b/content/posts/006-stm32begin-005-tofs.md @@ -0,0 +1,30 @@ +--- +title: "STM32 For Beginners [5]: Time of Flight Sensors" +date: 2024-10-09T00:36:00+03:00 +draft: false +summary: "..." +author: "Rusted Skull" +series: ["STM32 For Beginners"] +tags: ["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