From 2fa3449178308bb2df93e0019a1e388691594310 Mon Sep 17 00:00:00 2001 From: Raymond Mouthaan Date: Sat, 21 Apr 2018 11:11:03 +0200 Subject: [PATCH] added hc-sr04 --- Wemos-D1-Mini.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Wemos-D1-Mini.md b/Wemos-D1-Mini.md index 39f8bb98..1c6ae554 100644 --- a/Wemos-D1-Mini.md +++ b/Wemos-D1-Mini.md @@ -231,3 +231,30 @@ In the Configuration -> Configure Module page, select the following: After reboot of the device the displays the VEML6070 UV light intensity. + +## HC-SR04 Ultrasonic Sensor + + + + +"This is the HC-SR04 ultrasonic ranging sensor. This economical sensor provides 2cm to 400cm of non-contact measurement functionality with a ranging accuracy that can reach up to 3mm. Each HC-SR04 module includes an ultrasonic transmitter, a receiver and a control circuit." See [HC-SR04 Ultrasonic Sensor](https://www.sparkfun.com/products/13959) for more information. + +Connecting the HC-SR04 to a Wemos Mini D1. + +| Wemos | HC-SR04 | +|---|---| +|GND |GND | +|5V |VCC | +|D6 (gpio12) |Trig | +|D7 (gpio13) |Echo | + +In the Configuration -> Configure Module page, select the following: +1. **Module Type : 18 Generic** +2. **D6 GPIO12 : 69 SR04 Tri** +3. **D7 GPIO13 : 70 SR04 Ech** + + + +After reboot of the device the displays the HC-SR04 distance. + + \ No newline at end of file