{:en}
Objective:
In this project, we will use the Arduino UNO board to drive HC-SR04 ultra Sound Distance Sensor and read distance in Arduino’s serial monitor.
Parts:
| 1 pc | Osoyoo UNO Board | ![]() |
| 1 pc | HC-SR04 ultra Sound Distance Sensor | ![]() |
| 1 pc | breadboard | ![]() |
Circuit Graph:
download code and copy/paste the code onto the Arduino IDE, then run the code.
Open the serial window on the upper right hand corner of the Arduino IDE, you will see result as below:
The number displayed on the monitor is directly proportional to the distance an object is away from the sensor. A small LED on the Arduino will light up if your hand is more than 50cm away from the sensor.{:}{:ja}
目的:
このプロジェクトでは、Arduino UNO ボードを使って、HC-SR04超音波測距センサー(測定できる範囲2cm~400cm)を作動し、Arduino IDEのserial monitorで距離数値を表示します。
パーツ:
| 1 pc | Osoyoo UNO ボード | ![]() |
| 1 pc | HC-SR04超音波測距センサー | ![]() |
| 1 pc | ブレッドボード | ![]() |
回路図(画像をクリックして拡大イメージを表示):
コード をダウンロードして、Arduino IDEにコーピーして、作動してくださいませ。
Arduino IDEのserial monitorで画像のように表示します(画像をクリックして拡大イメージを表示):
serial monitorの数値は障害物とセンサーの距離です、障害物をセンサーに近づいてくると数値も小さくなります。
{:}
You must be logged in to post a comment
About the Author