{"id":2710,"date":"2025-05-30T14:07:50","date_gmt":"2025-05-30T06:07:50","guid":{"rendered":"https:\/\/lasersensor.net\/?p=2710"},"modified":"2026-02-28T17:35:01","modified_gmt":"2026-02-28T09:35:01","slug":"esp32-laser-distance-sensor-setup-and-applications","status":"publish","type":"post","link":"https:\/\/lasersensor.net\/ja\/esp32-laser-distance-sensor-setup-and-applications\/","title":{"rendered":"ESP32\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\uff1a\u63a5\u7d9a\u65b9\u6cd5\u3068\u69cb\u7bc9\u3067\u304d\u308b\u3082\u306e"},"content":{"rendered":"<h2 class=\"wp-block-heading\">ESP32\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\uff1a\u63a5\u7d9a\u65b9\u6cd5\u3068\u69cb\u7bc9\u3067\u304d\u308b\u3082\u306e<\/h2><h3 class=\"wp-block-heading\">\u6982\u8981<\/h3><p>IoT\u3084\u7d44\u307f\u8fbc\u307f\u958b\u767a\u306e\u4e16\u754c\u3067\u306f <strong>ESP32\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc<\/strong> \u306e\u7d44\u307f\u5408\u308f\u305b\u306f\u3001\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306e\u8ddd\u96e2\u6e2c\u5b9a\u306e\u305f\u3081\u306e\u6c4e\u7528\u7684\u3067\u30b3\u30b9\u30c8\u52b9\u7387\u306e\u9ad8\u3044\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u3068\u3057\u3066\u969b\u7acb\u3063\u3066\u3044\u307e\u3059\u3002\u30b9\u30de\u30fc\u30c8\u30d1\u30fc\u30ad\u30f3\u30b0\u30a2\u30b7\u30b9\u30bf\u30f3\u30c8\u3001\u30ed\u30dc\u30c3\u30c8\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u30b7\u30b9\u30c6\u30e0\u3001\u7523\u696d\u7528\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u30c7\u30d0\u30a4\u30b9\u306a\u3069\u3001ESP32\u3068\u30ec\u30fc\u30b6\u30fc\u30bb\u30f3\u30b5\u30fc\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001\u30b9\u30d4\u30fc\u30c9\u3001\u7cbe\u5ea6\u3001\u30ef\u30a4\u30e4\u30ec\u30b9\u5236\u5fa1\u306e\u3059\u3079\u3066\u3092\u30b3\u30f3\u30d1\u30af\u30c8\u306a\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3067\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002<\/p><p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001ESP32\u3068\u3055\u307e\u3056\u307e\u306a\u30bf\u30a4\u30d7\u306e\u30ec\u30fc\u30b6\u30fc\u30bb\u30f3\u30b5\u30fc\u3092\u63a5\u7d9a\u3059\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u3001\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u793a\u3057\u3066\u3001\u3053\u306e\u591a\u7528\u9014\u306a\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3067\u3069\u306e\u3088\u3046\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3067\u304d\u308b\u304b\u3092\u63a2\u308a\u307e\u3059\u3002<\/p><div class=\"wp-block-uagb-image uagb-block-b619ee57 wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/ESP32-laser-distance-sensor1.jpg\" alt=\"ESP32 laser distance sensor\" class=\"uag-image-2716\" width=\"800\" height=\"400\" title=\"ESP32\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\" role=\"img\" \/><\/figure><\/div><h3 class=\"wp-block-heading\">ESP32\u3068\u306f\u4f55\u304b\u3001\u4f55\u304c\u3067\u304d\u308b\u306e\u304b\uff1f<\/h3><p>\u306b\u3064\u3044\u3066 <strong>ESP32<\/strong> \u306f\u3001\u30a8\u30b9\u30d7\u30ec\u30b7\u30d5\u30fb\u30b7\u30b9\u30c6\u30e0\u30ba\u304c\u958b\u767a\u3057\u305f\u5f37\u529b\u3067\u4f4e\u4fa1\u683c\u306a\u30de\u30a4\u30af\u30ed\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3067\u3059\u3002\u305d\u306e\u7279\u5fb4\u306f<\/p><ul class=\"wp-block-list\"><li><strong>\u30c7\u30e5\u30a2\u30eb\u30b3\u30a232\u30d3\u30c3\u30c8\u30fb\u30d7\u30ed\u30bb\u30c3\u30b5\u30fc<\/strong><\/li>\n\n<li><strong>Wi-Fi\u304a\u3088\u3073Bluetooth\uff08\u30af\u30e9\u30b7\u30c3\u30af\u304a\u3088\u3073BLE\uff09<\/strong> \u5185\u8535<\/li>\n\n<li>\u8907\u6570\u306eGPIO\u3001UART\u3001I2C\u3001SPI\u3001PWM\u3001ADC\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9<\/li>\n\n<li><strong>\u4f4e\u6d88\u8cbb\u96fb\u529b\u30e2\u30fc\u30c9<\/strong><\/li>\n\n<li>\u30af\u30e9\u30a6\u30c9\u63a5\u7d9a\u3068OTA\uff08Over-the-Air\uff09\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306e\u30b5\u30dd\u30fc\u30c8<\/li><\/ul><div class=\"wp-block-uagb-image uagb-block-02ff8815 wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/ESP32-laser-sensor.jpg\" alt=\"ESP32\" class=\"uag-image-2711\" width=\"643\" height=\"643\" title=\"ESP32\u30ec\u30fc\u30b6\u30fc\u30bb\u30f3\u30b5\u30fc\" role=\"img\" \/><\/figure><\/div><p>\u30ef\u30a4\u30e4\u30ec\u30b9\u6a5f\u80fd\u3068\u5f37\u529b\u306a\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30fb\u30b5\u30dd\u30fc\u30c8\u306b\u3088\u308a\u3001ESP32\u306fIoT\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3001\u30bb\u30f3\u30b5\u30fc\u7d71\u5408\u3001\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30fb\u30c7\u30fc\u30bf\u30fb\u30ed\u30ae\u30f3\u30b0\u3001\u30aa\u30fc\u30c8\u30e1\u30fc\u30b7\u30e7\u30f3\u30fb\u30b7\u30b9\u30c6\u30e0\u306b\u6700\u9069\u3067\u3059\u3002<\/p><h3 class=\"wp-block-heading\">ESP32\u3068\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u7406\u7531<\/h3><p>\u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u3002 <strong>\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc<\/strong>ESP32\u306f\u30b9\u30de\u30fc\u30c8\u306a\u8a08\u6e2c\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3068\u306a\u308b\u3002\u30ec\u30fc\u30b6\u30fc\u30bb\u30f3\u30b5\u30fc\u306f <strong>\u30df\u30ea\u30e1\u30fc\u30c8\u30eb\u30ec\u30d9\u30eb\u306e\u7cbe\u5ea6<\/strong>\u5fdc\u7b54\u901f\u5ea6\u304c\u901f\u304f\u3001\u901a\u4fe1\u8ddd\u96e2\u304c\u9577\u3044\u3002\u3053\u308c\u306b\u3088\u308a <strong><a href=\"https:\/\/lasersensor.net\/ja\/product\/ldl-t-laser-distance-measurement-module\/\"><span style=\"color: #0693e3;\" class=\"stk-highlight\">esp32 \u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc<\/span><\/a><\/strong> \u306e\u3088\u3046\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u6700\u9069\u306a\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\uff1a<\/p><ul class=\"wp-block-list\"><li>\u30ed\u30dc\u30c3\u30c8\u5de5\u5b66\u3068\u30c9\u30ed\u30fc\u30f3\u30fb\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3<\/li>\n\n<li>\u969c\u5bb3\u7269\u691c\u77e5\u3068\u8fd1\u63a5\u30a2\u30e9\u30fc\u30c8<\/li>\n\n<li>\u7523\u696d\u30aa\u30fc\u30c8\u30e1\u30fc\u30b7\u30e7\u30f3\u3068\u5b89\u5168\u5730\u5e2f<\/li>\n\n<li>\u30b9\u30de\u30fc\u30c8\u30db\u30fc\u30e0\u30c7\u30d0\u30a4\u30b9\uff08\u30c9\u30a2\u3084\u7a93\u306e\u4f4d\u7f6e\u6e2c\u5b9a\u306a\u3069\uff09<\/li>\n\n<li>\u30bf\u30f3\u30af\u30ec\u30d9\u30eb\u76e3\u8996\u3068\u5009\u5eab\u7269\u6d41<\/li><\/ul><div class=\"wp-block-uagb-image uagb-block-e9416595 wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/ESP32-laser-distance-sensor.jpg\" alt=\"ESP32 laser distance sensor\" class=\"uag-image-2713\" width=\"723\" height=\"723\" title=\"ESP32\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\" role=\"img\" \/><\/figure><\/div><h3 class=\"wp-block-heading\">\u5fc5\u8981\u306a\u3082\u306e<\/h3><p>\u3092\u69cb\u7bc9\u3059\u308b\u3002 <strong>ESP32\u30ec\u30fc\u30b6\u30fc\u30bb\u30f3\u30b5\u30fc<\/strong> \u30b7\u30b9\u30c6\u30e0\u3067\u306f\u3001\u4ee5\u4e0b\u306e\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u3092\u6e96\u5099\u3059\u308b\uff1a<\/p><ul class=\"wp-block-list\"><li>1x ESP32\u958b\u767a\u30dc\u30fc\u30c9<\/li>\n\n<li>1x \u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\u30e2\u30b8\u30e5\u30fc\u30eb\uff08\u4f8b\uff0e <a href=\"https:\/\/lasersensor.net\/ja\/product\/1mm-high-precision-laser-distance-sensor\/\"><span style=\"color: #0693e3;\" class=\"stk-highlight\"><strong>LDL\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc<\/strong><\/span><\/a> \u3042\u308b\u3044\u306f <a href=\"https:\/\/lasersensor.net\/ja\/product\/ts1224-1500m-laser-rangefinder-sensor\/\"><span style=\"color: #0693e3;\" class=\"stk-highlight\"><strong>TS1224 \u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u8a08\u30bb\u30f3\u30b5\u30fc<\/strong><\/span><\/a>)<\/li>\n\n<li>\u30b8\u30e3\u30f3\u30d1\u30fc\u7dda<\/li>\n\n<li>\u30d6\u30ec\u30c3\u30c9\u30dc\u30fc\u30c9\uff08\u30aa\u30d7\u30b7\u30e7\u30f3\uff09<\/li>\n\n<li>\u96fb\u6e90\uff08\u30bb\u30f3\u30b5\u30fc\u306b\u3088\u308a3.3V\u307e\u305f\u306f5V\uff09<\/li><\/ul><h3 class=\"wp-block-heading\">\u914d\u7dda\u30ac\u30a4\u30c9ESP32\u3068\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\u306e\u63a5\u7d9a<\/h3><h4 class=\"wp-block-heading\">I2C \u30ec\u30fc\u30b6\u30fc\u30bb\u30f3\u30b5\u30fc\u7528 \uff1a<\/h4><ul class=\"wp-block-list\"><li><strong>\u30d6\u30a4\u30b7\u30fc\u30b7\u30fc<\/strong> \u2192 ESP32 3.3V<\/li>\n\n<li><strong>GND<\/strong> \u2192 ESP32 GND<\/li>\n\n<li><strong>SDA<\/strong> \u2192 ESP32 GPIO21<\/li>\n\n<li><strong>SCL<\/strong> \u2192 ESP32 GPIO22<\/li><\/ul><h4 class=\"wp-block-heading\">UART \u30ec\u30fc\u30b6\u30fc\u30bb\u30f3\u30b5\u30fc\u7528 \uff1a<\/h4><ul class=\"wp-block-list\"><li><strong>\u30d6\u30a4\u30b7\u30fc\u30b7\u30fc<\/strong> \u2192 ESP32 5V<\/li>\n\n<li><strong>GND<\/strong> \u2192 ESP32 GND<\/li>\n\n<li><strong>TX\uff08\u30bb\u30f3\u30b5\u30fc\uff09<\/strong> \u2192 ESP32 RX (\u4f8b\uff1aGPIO16)<\/li>\n\n<li><strong>RX\uff08\u30bb\u30f3\u30b5\u30fc\uff09<\/strong> \u2192 ESP32 TX (\u4f8b\uff1aGPIO17)<\/li><\/ul><div class=\"wp-block-uagb-image uagb-block-223666d2 wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/Pin-Definitions-and-Wiring.jpg\" alt=\"\" class=\"uag-image-2714\" width=\"735\" height=\"735\" title=\"\u30d4\u30f3\u306e\u5b9a\u7fa9\u3068\u914d\u7dda\" role=\"img\" \/><\/figure><\/div><h4 class=\"wp-block-heading\">RS485\u7523\u696d\u7528\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\u7528\uff1a<\/h4><p>RS485-TTL\u30b3\u30f3\u30d0\u30fc\u30bf\u3092\u4f7f\u7528\u3057\u3001\u30b3\u30f3\u30d0\u30fc\u30bf\u306eTX\u3068RX\u3092ESP32\u306e\u30b7\u30ea\u30a2\u30eb\u30d4\u30f3\u306b\u63a5\u7d9a\u3057\u307e\u3059\u3002RS485\u306f\u5b89\u5b9a\u3057\u305f\u9577\u8ddd\u96e2\u901a\u4fe1\u3092\u53ef\u80fd\u306b\u3057\u3001\u904e\u9177\u306a\u7523\u696d\u74b0\u5883\u306b\u6700\u9069\u3067\u3059\u3002<\/p><h3 class=\"wp-block-heading\">\u30b3\u30fc\u30c9\u4f8bLDL\u306b\u3088\u308bI2C<\/h3><pre class=\"wp-block-preformatted\"><code>1TP5\u30a4\u30f3\u30af\u30eb\u30fc\u30c9<br>1TP5\u3092\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u3057\u307e\u3059\u3002<br><br>Adafruit_VL53L0X lox = Adafruit_LDL()\uff1b<br><br>void setup() {<br>  Serial.begin(115200)\uff1b<br>  Wire.begin()\uff1b<br><br>  \u3082\u3057(!lox.begin()){\u3002<br>    Serial.println(\"LDL \u30bb\u30f3\u30b5\u30fc\u306e\u8d77\u52d5\u306b\u5931\u6557\u3057\u307e\u3057\u305f\")\uff1b<br>    1\uff09\u306e\u9593\uff1b<br>  }<br>}<br><br>void loop() {<br>  LDL_RangingMeasurementData_t measure\uff1b<br>  lox.rangingTest(&amp;measure, false)\uff1b<br><br>  if (measure.RangeStatus != 4) {.<br>    Serial.print(\"Distance (mm)\uff1a\");<br>    Serial.println(measure.RangeMilliMeter)\uff1b<br>  } else {<br>    Serial.println(\"Out of range\")\uff1b<br>  }<br><br>  delay(500)\uff1b<br>}<br><\/code><\/pre><h3 class=\"wp-block-heading\">ESP32\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\u3067\u4f55\u304c\u4f5c\u308c\u308b\u304b\uff1f<\/h3><p>\u4ee5\u4e0b\u306f\u3001\u5b9f\u969b\u306e\u5fdc\u7528\u4f8b\u3067\u3042\u308b\u3002 <strong>esp32 \u30ec\u30fc\u30b6\u30fc\u30bb\u30f3\u30b5\u30fc<\/strong> \u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3057\u305f\uff1a<\/p><h4 class=\"wp-block-heading\">\u30b9\u30de\u30fc\u30c8\u30d1\u30fc\u30ad\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0<\/h4><p>\u8ddd\u96e2\u8a08\u6e2c\u306b\u3088\u308a\u99d0\u8eca\u30b9\u30da\u30fc\u30b9\u5185\u306e\u8eca\u4e21\u306e\u6709\u7121\u3092\u691c\u51fa\u3059\u308b\u3002<\/p><h4 class=\"wp-block-heading\">\u30ed\u30dc\u30c3\u30c8\u306e\u969c\u5bb3\u7269\u56de\u907f<\/h4><p>\u30ed\u30dc\u30c3\u30c8\u304c\u58c1\u3084\u5bb6\u5177\u3001\u52d5\u304f\u7269\u4f53\u3092\u691c\u77e5\u3057\u3001\u5b89\u5168\u306b\u30ca\u30d3\u30b2\u30fc\u30c8\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p><h4 class=\"wp-block-heading\">\u30b9\u30de\u30fc\u30c8\u30db\u30fc\u30e0\u30aa\u30fc\u30c8\u30e1\u30fc\u30b7\u30e7\u30f3<\/h4><p>\u30c9\u30a2\u3084\u5f15\u304d\u51fa\u3057\u3092\u76e3\u8996\u3057\u305f\u308a\u3001\u30bf\u30f3\u30af\u306e\u6db2\u9762\u3092\u6e2c\u5b9a\u3057\u305f\u308a\u3059\u308b\u306e\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p><h4 class=\"wp-block-heading\">\u5de5\u696d\u30d7\u30ed\u30bb\u30b9\u76e3\u8996<\/h4><p>\u81ea\u52d5\u5316\u3055\u308c\u305f\u6a5f\u68b0\u3084\u4fdd\u7ba1\u30b7\u30b9\u30c6\u30e0\u306e\u8ddd\u96e2\u3092\u8ffd\u8de1\u3057\u3001\u5b89\u5168\u6027\u3068\u5236\u5fa1\u6027\u3092\u5411\u4e0a\u3055\u305b\u307e\u3059\u3002<\/p><h4 class=\"wp-block-heading\">\u30ef\u30a4\u30e4\u30ec\u30b9\u8a08\u6e2c\u30ed\u30ac\u30fc<\/h4><p>Wi-Fi\u307e\u305f\u306fBluetooth\u3092\u4f7f\u7528\u3057\u3066\u3001\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u306e\u8ddd\u96e2\u30c7\u30fc\u30bf\u3092\u30e2\u30d0\u30a4\u30eb\u30a2\u30d7\u30ea\u3001\u30af\u30e9\u30a6\u30c9\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3001\u307e\u305f\u306f\u30ed\u30fc\u30ab\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u9001\u4fe1\u3057\u307e\u3059\u3002<\/p><div class=\"wp-block-uagb-image uagb-block-115e3e2c wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-none\"><figure class=\"wp-block-uagb-image__figure\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/03\/laser-distance-sensor-applications.jpg\" alt=\"laser distance sensor applications\" class=\"uag-image-2405\" width=\"553\" height=\"553\" title=\"\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\" role=\"img\" \/><\/figure><\/div><h3 class=\"wp-block-heading\">\u6700\u7d42\u7684\u306a\u611f\u60f3<\/h3><p>\u306b\u3064\u3044\u3066 <strong>ESP32\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc<\/strong> \u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306f\u3001\u30a8\u30f3\u30b8\u30cb\u30a2\u3001\u30db\u30d3\u30a4\u30b9\u30c8\u3001IoT\u958b\u767a\u8005\u306b\u3068\u3063\u3066\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u3067\u3059\u3002\u30ef\u30a4\u30e4\u30ec\u30b9\u63a5\u7d9a\u3001\u9ad8\u7cbe\u5ea6\u30ec\u30fc\u30b6\u30fc\u30fb\u30bb\u30f3\u30b7\u30f3\u30b0\u3001\u7c21\u5358\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306b\u3088\u308a\u3001\u5bb6\u5ead\u7528\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304b\u3089\u7523\u696d\u7528\u30b7\u30b9\u30c6\u30e0\u307e\u3067\u3001\u3053\u306e\u7d44\u307f\u5408\u308f\u305b\u306f\u7121\u9650\u306e\u53ef\u80fd\u6027\u3092\u5e83\u3052\u307e\u3059\u3002<\/p><p>ESP32\u3092\u4f7f\u3044\u59cb\u3081\u305f\u3070\u304b\u308a\u3067\u3082\u3001\u6e2c\u5b9a\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u306e\u62e1\u5f35\u3092\u691c\u8a0e\u3057\u3066\u3044\u308b\u5834\u5408\u3067\u3082\u3001ESP32\u3092\u7d71\u5408\u3059\u308b\u3053\u3068\u3067\u3001\u3088\u308a\u52b9\u7387\u7684\u306a\u6e2c\u5b9a\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002 <strong>esp32 \u30ec\u30fc\u30b6\u30fc\u30bb\u30f3\u30b5\u30fc<\/strong> \u306f\u30b9\u30de\u30fc\u30c8\u3067\u672a\u6765\u306b\u5bfe\u5fdc\u3057\u305f\u9078\u629e\u3067\u3042\u308b\u3002<\/p><p>\u3082\u3057 <strong><a href=\"https:\/\/lasersensor.net\/ja\/product\/ldl-t-laser-distance-measurement-module\/\"><span style=\"color: #0693e3;\" class=\"stk-highlight\">ESP32\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc<\/span><\/a><\/strong> \u307e\u305f\u3001\u304a\u5ba2\u69d8\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u6700\u9069\u306a\u30ec\u30fc\u30b6\u30fc\u30bb\u30f3\u30b5\u30fc\u3092\u9078\u629e\u3059\u308b\u305f\u3081\u306e\u30d8\u30eb\u30d7\u304c\u5fc5\u8981\u306a\u5834\u5408\u306f\u3001\u304a\u6c17\u8efd\u306b\u304a\u554f\u3044\u5408\u308f\u305b\u304f\u3060\u3055\u3044\u3002\u5f53\u793e\u306e\u6280\u8853\u30c1\u30fc\u30e0\u304c\u3001\u30ac\u30a4\u30c0\u30f3\u30b9\u3001\u88fd\u54c1\u30b5\u30dd\u30fc\u30c8\u3001\u304a\u5ba2\u69d8\u306e\u30cb\u30fc\u30ba\u306b\u5408\u308f\u305b\u305f\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u3092\u63d0\u4f9b\u3044\u305f\u3057\u307e\u3059\u3002<\/p><h3 class=\"wp-block-heading\">FAQ<\/h3><p><strong>Q1: Can a laser distance sensor be directly connected to an ESP32?<\/strong><br>Yes. Most laser distance sensors support UART or TTL interfaces, which can be directly connected to the ESP32 GPIO pins.<\/p><p><strong>Q2: Which interface works best with ESP32?<\/strong><br>UART is the most recommended interface due to stable communication and easy implementation on ESP32.<\/p><p><strong>Q3: Is level shifting required for ESP32?<\/strong><br>ESP32 uses 3.3V logic. Ensure the sensor output is 3.3V compatible or use a level shifter if the sensor operates at 5V TTL.<\/p><p><strong>Q4: What programming environment is commonly used?<\/strong><br>The Arduino IDE is widely used, and the ESP32 can read distance data through standard serial communication.<\/p><p><strong>Q5: What projects can be built with ESP32 and a laser distance sensor?<\/strong><br>Common projects include obstacle avoidance robots, smart level measurement, distance-based triggering systems, and IoT monitoring applications.<\/p><p><strong>E\u30e1\u30fc\u30eb<\/strong> <a href=\"mailto:sales@lasersensor.net\"><span style=\"color: #0693e3;\" class=\"stk-highlight\">sales@lasersensor.net<\/span><\/a><br><strong>\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8<\/strong> <span style=\"color: #0693e3;\" class=\"stk-highlight\">www.lasersensor.net<\/span><br><strong>\u96fb\u8a71<\/strong> +86 15008368630<\/p><p>\u6b63\u78ba\u3055\u3068\u9769\u65b0\u6027\u3092\u3082\u3063\u3066\u3001\u3042\u306a\u305f\u306e\u30a2\u30a4\u30c7\u30a2\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306b\u4e00\u7dd2\u306b\u50cd\u304d\u307e\u3057\u3087\u3046\u3002<\/p><p><\/p>","protected":false},"excerpt":{"rendered":"<p>ESP32 Laser Distance Sensor: How to Connect and What You Can Build Overview In the world of IoT and embedded development, the ESP32 laser distance sensor combination stands out as [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2716,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[34],"tags":[],"class_list":["post-2710","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-industry-news"],"uagb_featured_image_src":{"full":["https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/ESP32-laser-distance-sensor1.jpg",800,400,false],"thumbnail":["https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/ESP32-laser-distance-sensor1-150x150.jpg",150,150,true],"medium":["https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/ESP32-laser-distance-sensor1-300x150.jpg",300,150,true],"medium_large":["https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/ESP32-laser-distance-sensor1-768x384.jpg",768,384,true],"large":["https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/ESP32-laser-distance-sensor1.jpg",800,400,false],"1536x1536":["https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/ESP32-laser-distance-sensor1.jpg",800,400,false],"2048x2048":["https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/ESP32-laser-distance-sensor1.jpg",800,400,false],"trp-custom-language-flag":["https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/ESP32-laser-distance-sensor1-18x9.jpg",18,9,true],"woocommerce_thumbnail":["https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/ESP32-laser-distance-sensor1-300x300.jpg",300,300,true],"woocommerce_single":["https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/ESP32-laser-distance-sensor1-600x300.jpg",600,300,true],"woocommerce_gallery_thumbnail":["https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/ESP32-laser-distance-sensor1-100x100.jpg",100,100,true]},"uagb_author_info":{"display_name":"mayerxiao01@gmail.com","author_link":"https:\/\/lasersensor.net\/ja\/author\/mayerxiao01gmail-com\/"},"uagb_comment_info":0,"uagb_excerpt":"ESP32 Laser Distance Sensor: How to Connect and What You Can Build Overview In the world of IoT and embedded development, the ESP32 laser distance sensor combination stands out as [&hellip;]","_links":{"self":[{"href":"https:\/\/lasersensor.net\/ja\/wp-json\/wp\/v2\/posts\/2710"}],"collection":[{"href":"https:\/\/lasersensor.net\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lasersensor.net\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lasersensor.net\/ja\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lasersensor.net\/ja\/wp-json\/wp\/v2\/comments?post=2710"}],"version-history":[{"count":2,"href":"https:\/\/lasersensor.net\/ja\/wp-json\/wp\/v2\/posts\/2710\/revisions"}],"predecessor-version":[{"id":3258,"href":"https:\/\/lasersensor.net\/ja\/wp-json\/wp\/v2\/posts\/2710\/revisions\/3258"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lasersensor.net\/ja\/wp-json\/wp\/v2\/media\/2716"}],"wp:attachment":[{"href":"https:\/\/lasersensor.net\/ja\/wp-json\/wp\/v2\/media?parent=2710"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lasersensor.net\/ja\/wp-json\/wp\/v2\/categories?post=2710"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lasersensor.net\/ja\/wp-json\/wp\/v2\/tags?post=2710"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}