Codey OnlineBiblioteka komponentów Arduino i ESP32 › TOF200C VL53L0X Distance Sensor Time-Of-Flight high precision
TOF200C VL53L0X Distance Sensor Time-Of-Flight high precision
Czujniki

TOF200C VL53L0X Distance Sensor Time-Of-Flight high precision

Moduł TOF200C wykorzystuje czujnik laserowy ST VL53L0X typu time-of-flight do pomiaru odległości przez mierzenie czasu odbicia światła. Zwykle podłącza się go przez magistralę I2C, aby mogły go odczytywać mikrokontrolery takie jak Arduino lub ESP32.

Szerokość: 21.5 mm

Pinout — TOF200C VL53L0X Distance Sensor Time-Of-Flight high precision

Pin Sygnał Opis
VIN power Module power input for the VL53L0X board, typically supplied from 3.3–5V depending on module regulator.
GND ground Ground reference for power and I2C signals.
SDA SDA I2C data line for reading distance measurements from the VL53L0X.
SCL SCL I2C clock line driven by the host controller for VL53L0X communication.
INT interrupt Interrupt output from the VL53L0X, used to signal measurement/data-ready events.
SHUT enable Shutdown/reset control input for the VL53L0X; drive low to disable or reset the sensor.

Przykładowy schemat połączeń — TOF200C VL53L0X Distance Sensor Time-Of-Flight high precision

Z Do Przewód
board:5V x1:VIN red
board:GND x1:GND black
board:A4 x1:SDA green
board:A5 x1:SCL blue

Przykładowy kod Arduino — TOF200C VL53L0X Distance Sensor Time-Of-Flight high precision

Ten przykład został napisany i sprawdzony kompilacją dla arduino-uno. Codey Online dostosuje go do każdej innej obsługiwanej płytki.

#include <Wire.h>
#include <Adafruit_VL53L0X.h>

Adafruit_VL53L0X lox;
VL53L0X_RangingMeasurementData_t measure;

void setup() {
  Serial.begin(115200);
  while (!Serial) {
    ;
  }

  Wire.begin();

  Serial.println("Adafruit VL53L0X distance sensor example");

  if (!lox.begin()) {
    Serial.println("Failed to boot VL53L0X. Check wiring.");
    while (1) {
      delay(10);
    }
  }

  Serial.println("VL53L0X ready.");
}

void loop() {
  lox.rangingTest(&measure, false);

  if (measure.RangeStatus != 4) {
    Serial.print("Distance: ");
    Serial.print(measure.RangeMilliMeter);
    Serial.println(" mm");
  } else {
    Serial.println("Out of range");
  }

  delay(200);
}

Podobne komponenty

18650 Battery Shield with USB-C Charger and 5V Boost Converter

18650 Battery Shield with USB-C Charger and 5V Boost Converter

2.4 inch OLED Display I2C 3.3V

2.4 inch OLED Display I2C 3.3V

3.5 inch TFT LCD Shield

3.5 inch TFT LCD Shield

50kg Load Cell Weight Sensor

50kg Load Cell Weight Sensor

Zbuduj swój projekt Arduino lub ESP32 z pomocą AI

Opisz, co chcesz zbudować. Codey Online napisze kod, narysuje schemat połączeń, skompiluje projekt i wgra go na płytkę bezpośrednio z przeglądarki.

Zacznij za darmo