{"id":2589,"date":"2025-05-13T15:48:04","date_gmt":"2025-05-13T07:48:04","guid":{"rendered":"https:\/\/lasersensor.net\/?p=2589"},"modified":"2026-02-28T17:01:06","modified_gmt":"2026-02-28T09:01:06","slug":"how-to-connect-raspberry-pi-laser-distance-sensor","status":"publish","type":"post","link":"https:\/\/lasersensor.net\/ja\/how-to-connect-raspberry-pi-laser-distance-sensor\/","title":{"rendered":"Raspberry Pi \u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\uff1a\u63a5\u7d9a\u65b9\u6cd5\u3068\u4f7f\u3044\u65b9"},"content":{"rendered":"<h2 class=\"wp-block-heading\">Raspberry Pi\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\uff1a\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3068\u4f7f\u3044\u65b9\u306e\u5b8c\u5168\u30ac\u30a4\u30c9<\/h2><p>\u306e\u7d44\u307f\u5408\u308f\u305b\u3067\u3042\u308b\u3002 <strong>\u30e9\u30ba\u30d9\u30ea\u30fc\u30d1\u30a4\u30fb\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc<\/strong> \u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306f\u3001\u958b\u767a\u8005\u3001\u30db\u30d3\u30a4\u30b9\u30c8\u3001\u30a8\u30f3\u30b8\u30cb\u30a2\u306b\u975e\u63a5\u89e6\u8ddd\u96e2\u6e2c\u5b9a\u306e\u305f\u3081\u306e\u5f37\u529b\u3067\u30b3\u30f3\u30d1\u30af\u30c8\u306a\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u30ed\u30dc\u30c3\u30c8\u5de5\u5b66\u3001\u30aa\u30fc\u30c8\u30e1\u30fc\u30b7\u30e7\u30f3\u3001IoT\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u3044\u305a\u308c\u306b\u53d6\u308a\u7d44\u3093\u3067\u3044\u308b\u5834\u5408\u3067\u3082\u3001\u975e\u63a5\u89e6\u8ddd\u96e2\u8a08\u3092\u7d71\u5408\u3059\u308b\u3053\u3068\u3067\u3001\u3088\u308a\u52b9\u7387\u7684\u306a\u8a08\u6e2c\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002 <strong><a href=\"https:\/\/lasersensor.net\/ja\/product\/ldk-laser-distance-sensor-arduino\/\"><span style=\"color: #0693e3;\" class=\"stk-highlight\">\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\u3068Raspberry Pi<\/span><\/a><\/strong> \u69d8\u3005\u306a\u30ec\u30f3\u30b8\u3067\u6b63\u78ba\u3067\u4fe1\u983c\u6027\u306e\u9ad8\u3044\u6e2c\u5b9a\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p><p>\u3053\u306e\u8a18\u4e8b\u3067\u306f <strong>\u30e9\u30ba\u30d9\u30ea\u30fc\u30d1\u30a4 \u30ec\u30fc\u30b6\u30fc\u30bb\u30f3\u30b5\u30fc<\/strong>\u4e00\u822c\u7684\u306a\u901a\u4fe1\u65b9\u6cd5\u3001\u5b9f\u7528\u7684\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3001\u6700\u9069\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u767a\u63ee\u3059\u308b\u305f\u3081\u306e\u30d2\u30f3\u30c8\u3002<\/p><div class=\"wp-block-uagb-image uagb-block-c13d9502 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\/raspberry-pi.jpg\" alt=\"raspberry pi\" class=\"uag-image-2594\" width=\"772\" height=\"512\" title=\"\u30e9\u30ba\u30d9\u30ea\u30fc\u30d1\u30a4\" role=\"img\" \/><\/figure><\/div><h3 class=\"wp-block-heading\">\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\u3068\u306f\uff1f<\/h3><p>A <span style=\"color: var(--ast-global-color-3);\" class=\"stk-highlight\">\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc<\/span> \u306f\u3001\u30ec\u30fc\u30b6\u30fc\u5149\u7dda\u3092\u4f7f\u7528\u3057\u3066\u5bfe\u8c61\u7269\u307e\u3067\u306e\u8ddd\u96e2\u3092\u6e2c\u5b9a\u3059\u308b\u88c5\u7f6e\u3067\u3042\u308b\u3002\u30ec\u30fc\u30b6\u30fc\u30d1\u30eb\u30b9\u3092\u7167\u5c04\u3057\u3001\u305d\u306e\u30d1\u30eb\u30b9\u304c\u5bfe\u8c61\u7269\u304b\u3089\u53cd\u5c04\u3057\u3066\u623b\u3063\u3066\u304f\u308b\u307e\u3067\u306e\u6642\u9593\u3092\u8a08\u7b97\u3057\u305f\u308a\u3001\u4f4d\u76f8\u30b7\u30d5\u30c8\u6cd5\u3084\u4e09\u89d2\u6e2c\u91cf\u6cd5\u3092\u4f7f\u3063\u305f\u308a\u3057\u3066\u52d5\u4f5c\u3059\u308b\u3002<\/p><p><strong>\u4e3b\u306a\u7279\u5fb4<\/strong><\/p><ul class=\"wp-block-list\"><li>\u975e\u63a5\u89e6\u6e2c\u5b9a<\/li>\n\n<li>\u9ad8\u7cbe\u5ea6\uff08\u6700\u5c0f\u00b11mm\uff09<\/li>\n\n<li>\u8fc5\u901f\u306a\u5bfe\u5fdc<\/li>\n\n<li>\u5c4b\u5185\u304a\u3088\u3073\u5c4b\u5916\u74b0\u5883\u306b\u9069\u3057\u3066\u3044\u308b<\/li><\/ul><p>\u3053\u308c\u3089\u306e\u7279\u5fb4\u306b\u3088\u308a\u3001\u30ec\u30fc\u30b6\u30fc\u30bb\u30f3\u30b5\u30fc\u306f\u30e9\u30ba\u30d9\u30ea\u30fc\u30d1\u30a4\u306e\u3088\u3046\u306a\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u306e\u306b\u7406\u60f3\u7684\u3067\u3001\u7279\u306b\u30b3\u30f3\u30d1\u30af\u30c8\u306a\u30b5\u30a4\u30ba\u3068\u7cbe\u5ea6\u3092\u5fc5\u8981\u3068\u3059\u308b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u9069\u3057\u3066\u3044\u308b\u3002<\/p><h3 class=\"wp-block-heading\">\u306a\u305cRaspberry Pi\u3067\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\u3092\u4f7f\u3046\u306e\u304b\uff1f<\/h3><div class=\"wp-block-uagb-image uagb-block-c73141ac 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\/Raspberry-PI-Laser-Distance-Sensor.jpg\" alt=\"Raspberry Pi Laser Distance Sensor\" class=\"uag-image-2593\" width=\"800\" height=\"400\" title=\"\u30e9\u30ba\u30d9\u30ea\u30fcPI\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\" role=\"img\" \/><figcaption class=\"uagb-image-caption\">Raspberry Pi \u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc<\/figcaption><\/figure><\/div><p>\u306b\u3064\u3044\u3066 <strong>\u30e9\u30ba\u30d9\u30ea\u30fc\u30d1\u30a4<\/strong>\u30b3\u30f3\u30d1\u30af\u30c8\u3067\u4f4e\u4fa1\u683c\u306a\u30b7\u30f3\u30b0\u30eb\u30dc\u30fc\u30c9\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u3067\u3042\u308bSBX\u306f\u3001\u30d7\u30ed\u30c8\u30bf\u30a4\u30d4\u30f3\u30b0\u3084\u7d44\u8fbc\u307f\u30b7\u30b9\u30c6\u30e0\u3067\u5e83\u304f\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3092\u7d71\u5408\u3059\u308b\u3053\u3068\u3067 <strong>\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\u3068Raspberry Pi<\/strong>\u305d\u306e\u305f\u3081\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30e1\u30ea\u30c3\u30c8\u304c\u3042\u308b\uff1a<\/p><ul class=\"wp-block-list\"><li><strong>\u30b3\u30f3\u30d1\u30af\u30c8\u306a\u30d5\u30a9\u30fc\u30e0\u30d5\u30a1\u30af\u30bf\u30fc\uff1a<\/strong> \u30e2\u30d0\u30a4\u30eb\u3084\u7d44\u307f\u8fbc\u307f\u30b7\u30b9\u30c6\u30e0\u306b\u6700\u9069<\/li>\n\n<li><strong>\u30d7\u30ed\u30b0\u30e9\u30e0\u53ef\u80fd\u306a\u74b0\u5883\uff1a<\/strong> Python\u3001C++\u3001\u305d\u306e\u4ed6\u306e\u8a00\u8a9e\u3067\u7c21\u5358\u306b\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u66f8\u3051\u308b<\/li>\n\n<li><strong>GPIO\u3068\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306e\u30b5\u30dd\u30fc\u30c8\uff1a<\/strong> \u901a\u4fe1\u306b\u306fUART\u3001I2C\u3001SPI\u3001\u307e\u305f\u306fUSB\u3092\u4f7f\u7528<\/li>\n\n<li><strong>\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\uff1a<\/strong> \u591a\u304f\u306e\u4e00\u822c\u7684\u306a\u30bb\u30f3\u30b5\u30fc\u306b\u4f7f\u7528\u53ef\u80fd<\/li><\/ul><p>Whether you are building an autonomous robot, <a href=\"https:\/\/lasersensor.net\/ja\/solutions\/laser-distance-sensor-in-industrial\/\"><span style=\"color: #0693e3;\" class=\"stk-highlight\">a smart measurement system<\/span><\/a>, or a DIY rangefinder, a <strong>\u30e9\u30ba\u30d9\u30ea\u30fc\u30d1\u30a4 \u30ec\u30fc\u30b6\u30fc\u30bb\u30f3\u30b5\u30fc<\/strong> \u306e\u7d44\u307f\u5408\u308f\u305b\u306f\u6c4e\u7528\u6027\u304c\u9ad8\u304f\u3001\u8cbb\u7528\u5bfe\u52b9\u679c\u3082\u9ad8\u3044\u3002<\/p><h3 class=\"wp-block-heading\">Raspberry Pi\u306b\u9069\u3057\u305f\u30ec\u30fc\u30b6\u30fc\u30bb\u30f3\u30b5\u30fc\u3092\u9078\u3076<\/h3><p>\u3092\u9078\u629e\u3059\u308b\u3002 <strong>\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc<\/strong> Raspberry Pi\u306e\u305f\u3081\u306b\u3001\u4ee5\u4e0b\u306e\u91cd\u8981\u306a\u8981\u7d20\u3092\u8003\u616e\u3057\u3066\u304f\u3060\u3055\u3044\uff1a<\/p><figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u7279\u5fb4<\/th><th>\u63a8\u85a6<\/th><\/tr><\/thead><tbody><tr><td><strong>\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9<\/strong><\/td><td>TTL\uff08UART\uff09\u3001USB\u3001RS232\u3001I2C<\/td><\/tr><tr><td><strong>\u52d5\u4f5c\u96fb\u5727<\/strong><\/td><td>3.3V\u307e\u305f\u306f5V\u5bfe\u5fdc<\/td><\/tr><tr><td><strong>\u6e2c\u5b9a\u7bc4\u56f2<\/strong><\/td><td>\u7528\u9014\u306b\u5fdc\u3058\u3066\u304a\u9078\u3073\u304f\u3060\u3055\u3044\uff08\u5c4b\u5185\/\u5c4b\u5916\u75280.03\uff5e200m\uff09<\/td><\/tr><tr><td><strong>\u983b\u5ea6<\/strong><\/td><td>\u30ea\u30d5\u30ec\u30c3\u30b7\u30e5\u306e\u5fc5\u8981\u6027\u306b\u5fdc\u3058\u30663-30Hz<\/td><\/tr><tr><td><strong>\u7cbe\u5ea6<\/strong><\/td><td>\u5de5\u696d\u7528\u30b0\u30ec\u30fc\u30c9\u306e\u30e2\u30c7\u30eb\u3067\u306f\u901a\u5e381\uff5e3mm<\/td><\/tr><tr><td><strong>\u74b0\u5883\u4fdd\u8b77<\/strong><\/td><td>\u904e\u9177\u306a\u74b0\u5883\u306b\u5bfe\u5fdc\u3059\u308bIP54\/IP67\u5b9a\u683c\u30e2\u30c7\u30eb<\/td><\/tr><\/tbody><\/table><\/figure><p>\u30d7\u30ed\u306e\u30d2\u30f3\u30c8\u7d44\u8fbc\u307f\u5236\u5fa1\u306b\u306fTTL UART\u304c\u671b\u307e\u3057\u3044\u3002<\/p><h3 class=\"wp-block-heading\">\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\u3092Raspberry Pi\u306b\u63a5\u7d9a\u3059\u308b\u65b9\u6cd5<\/h3><h4 class=\"wp-block-heading\">TTL UART\u63a5\u7d9a\uff08\u6700\u3082\u4e00\u822c\u7684\uff09<\/h4><h4 class=\"wp-block-heading\">\u914d\u7dda\u56f3<\/h4><figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u30bb\u30f3\u30b5\u30fc\u30d4\u30f3<\/th><th>\u30e9\u30ba\u30d9\u30ea\u30fc\u30d1\u30a4\u30fb\u30d4\u30f3<\/th><\/tr><\/thead><tbody><tr><td>\u30d6\u30a4\u30b7\u30fc\u30b7\u30fc<\/td><td>5V\uff08\u30d4\u30f32\uff09\u307e\u305f\u306f3.3V\uff08\u30d4\u30f31\uff09<\/td><\/tr><tr><td>GND<\/td><td>GND (\u30d4\u30f3 6)<\/td><\/tr><tr><td>TX<\/td><td>GPIO15\uff08RXD\u3001\u30d4\u30f310\uff09<\/td><\/tr><tr><td>RX<\/td><td>GPIO14\uff08TXD\u3001\u30d4\u30f38\uff09<\/td><\/tr><\/tbody><\/table><\/figure><div class=\"wp-block-uagb-image uagb-block-f512d326 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.jpg\" alt=\"laser sensor pin\" class=\"uag-image-2591\" width=\"800\" height=\"435\" title=\"\u30ec\u30fc\u30b6\u30fc\u30bb\u30f3\u30b5\u30fc\u30d4\u30f3\" role=\"img\" \/><\/figure><\/div><p>\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\u306b\u306f\u3001\u6b21\u306e\u3088\u3046\u306a\u3055\u307e\u3056\u307e\u306a\u7a2e\u985e\u304c\u3042\u308b\uff1a<\/p><ul class=\"wp-block-list\"><li>UART\/\u30b7\u30ea\u30a2\u30eb\u30d9\u30fc\u30b9\u306e\u30e2\u30b8\u30e5\u30fc\u30eb<\/li>\n\n<li>I2C\u30d9\u30fc\u30b9\u306e\u30bb\u30f3\u30b5\u30fc<\/li>\n\n<li>USB\u30ec\u30fc\u30b6\u30fc\u30bb\u30f3\u30b5\u30fc<\/li><\/ul><h4 class=\"wp-block-heading\">UART\uff08\u30b7\u30ea\u30a2\u30eb\u901a\u4fe1\uff09\u3092\u4f7f\u7528\u3057\u305f\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u4f8b<\/h4><h5 class=\"wp-block-heading\">\u5fc5\u8981\u306a\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8<\/h5><ul class=\"wp-block-list\"><li>Raspberry Pi (GPIO\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u30e2\u30c7\u30eb\u3067\u3042\u308c\u3070\u4f55\u3067\u3082)<\/li>\n\n<li>UART\u51fa\u529b\u4ed8\u304d\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\uff08905nm\u307e\u305f\u306fTOF\u30d9\u30fc\u30b9\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u306a\u3069\uff09<\/li>\n\n<li>\u30ec\u30d9\u30eb\u30b7\u30d5\u30bf\u30fc\uff08\u30bb\u30f3\u30b5\u30fc\u304c5V\u3001Pi\u304c3.3V\u3067\u52d5\u4f5c\u3059\u308b\u5834\u5408\uff09<\/li>\n\n<li>\u30b8\u30e3\u30f3\u30d1\u30fc\u7dda<\/li><\/ul><h5 class=\"wp-block-heading\">\u63a5\u7d9a\u30b9\u30c6\u30c3\u30d7\uff1a<\/h5><ol class=\"wp-block-list\"><li><strong>GND\u3068VCC\u3092\u63a5\u7d9a<\/strong>:\u30bb\u30f3\u30b5\u30fc\u306b\u96fb\u529b\u3092\u4f9b\u7d66\uff08\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u3088\u308a\u901a\u5e385V\u307e\u305f\u306f3.3V\uff09<\/li>\n\n<li><strong>\u30bb\u30f3\u30b5\u30fc\u304b\u3089RX\uff08GPIO15\uff09\u3078\u306eTX<\/strong> \u30e9\u30ba\u30d9\u30ea\u30fc\u30d1\u30a4<\/li>\n\n<li><strong>\u30bb\u30f3\u30b5\u30fc\u304b\u3089TX\uff08GPIO14\uff09\u3078\u306eRX<\/strong> - \u3057\u3070\u3057\u3070\u30ec\u30d9\u30eb\u30b7\u30d5\u30bf\u30fc\u3092\u901a\u3057\u3066<\/li>\n\n<li>Raspberry Pi\u306e\u30b7\u30ea\u30a2\u30eb\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u6709\u52b9\u306b\u3059\u308b\u3002 <code>\u30e9\u30b9\u30d4\u30b3\u30f3\u30d5\u30a3\u30b0<\/code><\/li>\n\n<li>Python\u3092\u4f7f\u3063\u3066\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3080\uff1a<\/li><\/ol><blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>\u6ce8<\/strong>:\u30bb\u30f3\u30b5\u30fc\u304c5V TTL\u30ed\u30b8\u30c3\u30af\u3067\u52d5\u4f5c\u3057\u3001Pi\u304c3.3V\u306e\u5834\u5408\u3001GPIO\u306e\u640d\u50b7\u3092\u907f\u3051\u308b\u305f\u3081\u306b\u30ed\u30b8\u30c3\u30af\u30ec\u30d9\u30eb\u30b3\u30f3\u30d0\u30fc\u30bf\u30fc\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p><\/blockquote><pre class=\"wp-block-preformatted\"><code>\u30a4\u30f3\u30dd\u30fc\u30c8\u30b7\u30ea\u30a2\u30eb<br><br>ser = serial.Serial(\"\/dev\/serial0\", baudrate=9600, timeout=1)<br>while True\uff1a<br>    data = ser.readline()<br>    print(\"Distance:\", data.decode().strip())<br><\/code><\/pre><h4 class=\"wp-block-heading\">I2C\u30d9\u30fc\u30b9\u306e\u30ec\u30fc\u30b6\u30fc\u30bb\u30f3\u30b5\u30fc\u63a5\u7d9a<\/h4><p>\u591a\u304f\u306e\u8fd1\u4ee3\u7684\u306a <strong>\u30e9\u30ba\u30d9\u30ea\u30fc\u30d1\u30a4\u30fb\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc<\/strong> \u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u3001VL53L0X\u3084VL53L1X\u98db\u884c\u6642\u9593\u30bb\u30f3\u30b5\u30fc\u306a\u3069\u306eI2C\u3082\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002<\/p><h5 class=\"wp-block-heading\">\u30b9\u30c6\u30c3\u30d7<\/h5><ol class=\"wp-block-list\"><li>SDA\u3068SCL\u3092Raspberry Pi\u306e\u5bfe\u5fdc\u3059\u308bGPIO\u30d4\u30f3\u306b\u63a5\u7d9a\u3059\u308b\u3002<\/li>\n\n<li>\u3067I2C\u3092\u6709\u52b9\u306b\u3059\u308b <code>\u30e9\u30b9\u30d4\u30b3\u30f3\u30d5\u30a3\u30b0<\/code><\/li>\n\n<li>\u5fc5\u8981\u306aPython\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\uff1a<\/li><\/ol><pre class=\"wp-block-preformatted\"><code>pip install adafruit-circuitpython-vl53l0x<br><\/code><\/pre><ol start=\"4\" class=\"wp-block-list\"><li>\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\uff1a<\/li><\/ol><pre class=\"wp-block-preformatted\"><code>\u30a4\u30f3\u30dd\u30fc\u30c8\u6642\u9593<br>\u30a4\u30f3\u30dd\u30fc\u30c8\u30dc\u30fc\u30c9<br>\u30a4\u30f3\u30dd\u30fc\u30c8\u30fb\u30d6\u30b8\u30aa<br>\u30a4\u30f3\u30dd\u30fc\u30c8 adafruit_vl53l0x<br><br>i2c = busio.I2C(board.SCL, board.SDA)<br>sensor = adafruit_vl53l0x.VL53L0X(i2c)<br><br>while True\uff1a<br>    print(\"\u8ddd\u96e2\uff1a{mm\".format(sensor.range))<br>    time.sleep(0.5)<br><\/code><\/pre><h3 class=\"wp-block-heading\">Raspberry Pi \u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\u306e\u7528\u9014<\/h3><ol class=\"wp-block-list\"><li><strong>\u30ed\u30dc\u30c3\u30c8\u5de5\u5b66<\/strong>:\u30ca\u30d3\u30b2\u30fc\u30b7\u30e7\u30f3\u3001\u885d\u7a81\u56de\u907f\u3001\u7269\u4f53\u691c\u51fa\u7528<\/li>\n\n<li><strong>\u7523\u696d\u30aa\u30fc\u30c8\u30e1\u30fc\u30b7\u30e7\u30f3<\/strong>:\u4f4d\u7f6e\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3001\u9ad8\u3055\u6e2c\u5b9a<\/li>\n\n<li><strong>\u30b9\u30de\u30fc\u30c8\u8fb2\u696d<\/strong>:\u6c34\u4f4d\u3084\u4f5c\u7269\u306e\u9ad8\u3055\u306e\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0<\/li>\n\n<li><strong>\u30db\u30fc\u30e0\u30aa\u30fc\u30c8\u30e1\u30fc\u30b7\u30e7\u30f3<\/strong>:\u30c9\u30a2\u691c\u77e5\u3001\u4fb5\u5165\u76e3\u8996<\/li>\n\n<li><strong>DIY\u30d7\u30ed\u30b8\u30a7\u30af\u30c8<\/strong>:\u30ab\u30b9\u30bf\u30e0\u8ddd\u96e2\u8a08\u3001\u30ec\u30fc\u30b6\u30fc\u5dfb\u5c3a<\/li><\/ol><div class=\"wp-block-uagb-image uagb-block-d9c9cd13 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\/Raspberry-PI-02.jpg\" alt=\"Raspberry PI\" class=\"uag-image-2592\" width=\"462\" height=\"462\" title=\"\u30e9\u30ba\u30d9\u30ea\u30fcPI\" role=\"img\" \/><\/figure><\/div><h3 class=\"wp-block-heading\">\u6700\u9069\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u305f\u3081\u306e\u30d2\u30f3\u30c8<\/h3><ul class=\"wp-block-list\"><li>\u6b63\u78ba\u306a\u8aad\u307f\u53d6\u308a\u306e\u305f\u3081\u306e\u9069\u5207\u306a\u30bb\u30f3\u30b5\u30fc\u30a2\u30e9\u30a4\u30e1\u30f3\u30c8\u306e\u78ba\u4fdd<\/li>\n\n<li>EMI\u3092\u9632\u6b62\u3059\u308b\u305f\u3081\u3001\u9577\u3044\u30ef\u30a4\u30e4\u30fc\u306b\u306f\u30b7\u30fc\u30eb\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3002<\/li>\n\n<li>\u96fb\u6e90\u8981\u4ef6\u3092\u78ba\u8a8d\u3059\u308b - \u4e00\u90e8\u306e\u30bb\u30f3\u30b5\u30fc\u306f\u30af\u30ea\u30fc\u30f3\u306a5V\u307e\u305f\u306f\u5916\u90e8\u96fb\u6e90\u3092\u5fc5\u8981\u3068\u3059\u308b<\/li>\n\n<li>\u306b\u3064\u3044\u3066 <a href=\"https:\/\/lasersensor.net\/ja\/product-category\/laser-rangefinder-sensor-module\/\"><span style=\"color: #0693e3;\" class=\"stk-highlight\"><strong>\u9577\u8ddd\u96e2\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u8a08\u30bb\u30f3\u30b5\u30fc<\/strong><\/span><\/a> (\u6700\u59275000m)\u3001\u76f4\u63a5\u8996\u7dda\u3092\u78ba\u4fdd\u3057\u3001\u53cd\u5c04\u5e72\u6e09\u3092\u907f\u3051\u308b\u3002<\/li><\/ul><h3 class=\"wp-block-heading\">\u7d50\u8ad6<\/h3><p>\u3092\u7d71\u5408\u3059\u308b\u3002 <strong>\u30e9\u30ba\u30d9\u30ea\u30fc\u30d1\u30a4\u30fb\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc<\/strong> \u306f\u3001\u7cbe\u5bc6\u6e2c\u5b9a\u3068\u30a4\u30f3\u30c6\u30ea\u30b8\u30a7\u30f3\u30c8\u30fb\u30b7\u30b9\u30c6\u30e0\u8a2d\u8a08\u306e\u53ef\u80fd\u6027\u3092\u5927\u304d\u304f\u5e83\u3052\u307e\u3059\u3002\u30bb\u30f3\u30b5\u30fc\u306e\u7d71\u5408\u3092\u63a2\u6c42\u3059\u308b\u30db\u30d3\u30a4\u30b9\u30c8\u3067\u3042\u308c\u3001\u30d7\u30ed\u30c8\u30bf\u30a4\u30d7\u3092\u69cb\u7bc9\u3059\u308b\u30d7\u30ed\u30d5\u30a7\u30c3\u30b7\u30e7\u30ca\u30eb\u3067\u3042\u308c\u3001\u3053\u306e\u5f37\u529b\u306a\u7d44\u307f\u5408\u308f\u305b\u306f\u3001\u30b9\u30de\u30fc\u30c8\u3067\u6b63\u78ba\u304b\u3064\u30b3\u30f3\u30d1\u30af\u30c8\u306a\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u3092\u53ef\u80fd\u306b\u3057\u307e\u3059\u3002<\/p><p>\u591a\u69d8\u5316\u3059\u308b <strong>\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc<\/strong> \u30ed\u30dc\u30c3\u30c8\u5de5\u5b66\u3001\u7523\u696d\u5236\u5fa1\u3001\u30b9\u30de\u30fc\u30c8\u74b0\u5883\u306b\u304a\u3051\u308b\u4fe1\u983c\u6027\u306e\u9ad8\u3044\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u958b\u767a\u304c\u3001\u3053\u308c\u307e\u3067\u4ee5\u4e0a\u306b\u5bb9\u6613\u306b\u306a\u308a\u307e\u3059\u3002<\/p><h3 class=\"wp-block-heading\">\u3088\u304f\u3042\u308b\u3054\u8cea\u554f<\/h3><p><strong>Q1: 1\u53f0\u306eRaspberry Pi\u3067\u8907\u6570\u306e\u30ec\u30fc\u30b6\u30fc\u8ddd\u96e2\u30bb\u30f3\u30b5\u30fc\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u304b\uff1f<\/strong><br>\u306f\u3044\u3001\u7570\u306a\u308bI2C\u30a2\u30c9\u30ec\u30b9\u307e\u305f\u306f\u8907\u6570\u306eUART\u30dd\u30fc\u30c8\uff08USB\u30a2\u30c0\u30d7\u30bf\u7d4c\u7531\uff09\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u3053\u308c\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p><p><strong>Q2\uff1aToF\u30bb\u30f3\u30b5\u30fc\u3068\u30d1\u30eb\u30b9\u5f0f\u30bb\u30f3\u30b5\u30fc\u306e\u9055\u3044\u306f\u4f55\u3067\u3059\u304b\uff1f<\/strong><br>ToF\uff08Time-of-Flight\uff09\u30bb\u30f3\u30b5\u30fc\u306f\u4e00\u822c\u7684\u306b\u77ed\u8ddd\u96e2\uff084m\u4ee5\u4e0b\uff09\u306b\u4f7f\u7528\u3055\u308c\u3001\u30b3\u30f3\u30d1\u30af\u30c8\u306a\u5f62\u72b6\u3067\u9ad8\u7cbe\u5ea6\u3092\u63d0\u4f9b\u3059\u308b\u3002\u30d1\u30eb\u30b9\u30d9\u30fc\u30b9\u306e\u30bb\u30f3\u30b5\u30fc\u306f\u3001\u3088\u308a\u9577\u8ddd\u96e2\uff08100m\uff5e3000m\uff09\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002<\/p><p><strong>Q3: Raspberry Pi\u306b\u30ec\u30fc\u30b6\u30fc\u30bb\u30f3\u30b5\u30fc\u7528\u306e\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u304b\uff1f<\/strong><br>USB\u30d9\u30fc\u30b9\u306e\u30bb\u30f3\u30b5\u30fc\u306b\u306f\u30c9\u30e9\u30a4\u30d0\u30fc\u304c\u5fc5\u8981\u306a\u3082\u306e\u3082\u3042\u308b\u304c\u3001\u307b\u3068\u3093\u3069\u306eUART\u3084I2C\u30d9\u30fc\u30b9\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u306fPython\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3048\u3070\u30d7\u30e9\u30b0\u30a2\u30f3\u30c9\u30d7\u30ec\u30a4\u3067\u5229\u7528\u3067\u304d\u308b\u3002<\/p>","protected":false},"excerpt":{"rendered":"<p>Raspberry Pi Laser Distance Sensor: Complete Guide to Setup and Use The combination of a raspberry pi laser distance sensor setup offers developers, hobbyists, and engineers a powerful, compact solution [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2590,"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-2589","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\/how-to-connect-raspberry-pi-with-laser-sensor.jpg",800,400,false],"thumbnail":["https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/how-to-connect-raspberry-pi-with-laser-sensor-150x150.jpg",150,150,true],"medium":["https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/how-to-connect-raspberry-pi-with-laser-sensor-300x150.jpg",300,150,true],"medium_large":["https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/how-to-connect-raspberry-pi-with-laser-sensor-768x384.jpg",768,384,true],"large":["https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/how-to-connect-raspberry-pi-with-laser-sensor.jpg",800,400,false],"1536x1536":["https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/how-to-connect-raspberry-pi-with-laser-sensor.jpg",800,400,false],"2048x2048":["https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/how-to-connect-raspberry-pi-with-laser-sensor.jpg",800,400,false],"trp-custom-language-flag":["https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/how-to-connect-raspberry-pi-with-laser-sensor.jpg",18,9,false],"woocommerce_thumbnail":["https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/how-to-connect-raspberry-pi-with-laser-sensor-300x300.jpg",300,300,true],"woocommerce_single":["https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/how-to-connect-raspberry-pi-with-laser-sensor-600x300.jpg",600,300,true],"woocommerce_gallery_thumbnail":["https:\/\/lasersensor.net\/wp-content\/uploads\/2025\/05\/how-to-connect-raspberry-pi-with-laser-sensor-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":"Raspberry Pi Laser Distance Sensor: Complete Guide to Setup and Use The combination of a raspberry pi laser distance sensor setup offers developers, hobbyists, and engineers a powerful, compact solution [&hellip;]","_links":{"self":[{"href":"https:\/\/lasersensor.net\/ja\/wp-json\/wp\/v2\/posts\/2589"}],"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=2589"}],"version-history":[{"count":1,"href":"https:\/\/lasersensor.net\/ja\/wp-json\/wp\/v2\/posts\/2589\/revisions"}],"predecessor-version":[{"id":3256,"href":"https:\/\/lasersensor.net\/ja\/wp-json\/wp\/v2\/posts\/2589\/revisions\/3256"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lasersensor.net\/ja\/wp-json\/wp\/v2\/media\/2590"}],"wp:attachment":[{"href":"https:\/\/lasersensor.net\/ja\/wp-json\/wp\/v2\/media?parent=2589"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lasersensor.net\/ja\/wp-json\/wp\/v2\/categories?post=2589"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lasersensor.net\/ja\/wp-json\/wp\/v2\/tags?post=2589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}