Skip to content

Commit 88301f1

Browse files
authored
Clarify ultrasound
1 parent 05f55cd commit 88301f1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

programming/arduino/sr_firmware.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ This means you can simply connect a switch between the input pin and a ground pi
133133

134134
You can also measure distance using an ultrasound sensor from the arduino. Ultrasound sensors return the distance of the closest object in mm.
135135

136+
To use this on your robot you will need use HC-SR04 ultrasound modules.
137+
136138
```python
137139
# Trigger pin: 4
138140
# Echo pin: 5
@@ -142,6 +144,7 @@ distance_mm = robot.arduino.ultrasound_measure(4, 5)
142144
```
143145

144146
<div class="warning">
145-
The ultrasound sensor can measure distances up to 4 metres.
146-
If the ultrasound signal has to travel further than 4m, the sensor will timeout and return 0.
147+
The ultrasound sensor can measure distances up to around 4 metres.
148+
If the ultrasound signal has to travel further, the echo may not be detected.
149+
This will cause the sensor to timeout and return 0.
147150
</div>

0 commit comments

Comments
 (0)