AllWize Library
examples/use_cases/sensor-hcsr04/README.md
Go to the documentation of this file.
1 # AllWize - Ultrasonic HC-SR04 Slave Example
2 
3 Shows how to use an ultrasonic HC-SR04 to send data about distance to a target.
4 
5 The HC-SR04 is a 5V digital sensor.
6 If you are using the AllWize K1 you must set the sensor power jumper to 5V and
7 connect your sensor to the digital grove connector (the one closer to the USB connector).
8 The connect the white cable to the ECHO pin and the yellow one to the TRIG pin
9 in the HC-SR04.
10 
11 Always remember to connect the antenna before powering the board!
12 
13 ## License
14 
15 Copyright (C) 2018-2020 by AllWize ([http://allwize.io](http://allwize.io))
16 
17 AllWize library is free software: you can redistribute it and/or modify
18 it under the terms of the GNU Lesser General Public License as published by
19 the Free Software Foundation, either version 3 of the License, or
20 (at your option) any later version.
21 
22 AllWize library is distributed in the hope that it will be useful,
23 but WITHOUT ANY WARRANTY; without even the implied warranty of
24 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 GNU Lesser General Public License for more details.
26 
27 You should have received a copy of the GNU Lesser General Public License
28 along with AllWize library. If not, see <http://www.gnu.org/licenses/>.