File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,8 @@ This means you can simply connect a switch between the input pin and a ground pi
133
133
134
134
You can also measure distance using an ultrasound sensor from the arduino. Ultrasound sensors return the distance of the closest object in mm.
135
135
136
+ To use this on your robot you will need use HC-SR04 ultrasound modules.
137
+
136
138
``` python
137
139
# Trigger pin: 4
138
140
# Echo pin: 5
@@ -142,6 +144,7 @@ distance_mm = robot.arduino.ultrasound_measure(4, 5)
142
144
```
143
145
144
146
<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.
147
150
</div >
You can’t perform that action at this time.
0 commit comments