Skip to content

Commit 6be98de

Browse files
committed
Add assembly/wiring instructions and diagram
1 parent e31f310 commit 6be98de

File tree

5 files changed

+25
-7
lines changed

5 files changed

+25
-7
lines changed

README.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,10 @@ This project carries code samples for different types of displays and sensors, u
44

55
## Available Examples
66

7-
### Displays
8-
9-
- [OLED: SSD1322 Driver](Displays/Ssd1322.php)
10-
117
### Sensors
128

13-
- [HCSR04: Ultrasonic ranging sensor](Sensors/HcSr04.php)
9+
- [HC-SR04: Ultrasonic Distance Sensor](Sensors/HcSr04/)
1410

1511
## License
1612

17-
This library is licensed under the [MIT License](LICENSE).
13+
This project is licensed under the [MIT License](LICENSE).

Sensors/HcSr04/HcSr04.fzz

2.63 KB
Binary file not shown.

Sensors/HcSr04.php Sensors/HcSr04/HcSr04.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
require_once __DIR__ . '/../vendor/autoload.php';
55

66
/**
7-
* This example measures distance using the HC-SR04 Ultrassonic sensor.
7+
* This example measures distance using the HC-SR04: Ultrasonic Distance Sensor.
88
* Requires ext-gpio (https://github.com/embedded-php/ext-gpio) to be installed.
99
*
1010
* Assembly instructions:

Sensors/HcSr04/HcSr04.png

157 KB
Loading

Sensors/HcSr04/README.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# HC-SR04: Ultrasonic Distance Sensor
2+
3+
## Requirements
4+
5+
The following libraries/extensions are required by this example:
6+
7+
* [ext-gpio](https://github.com/embedded-php/ext-gpio)
8+
9+
## Assembly
10+
11+
The wiring instructions below are required to run this example *without* modification.
12+
13+
HC-SR04 | Raspberry Pi | Reference
14+
--------|--------------|----------
15+
VCC | Pin 02 | [5v Power](https://pinout.xyz/pinout/5v_power#)
16+
Trigger | Pin 22 | [GPIO 25](https://pinout.xyz/pinout/pin22_gpio25#)
17+
Echo | Pin 18 | [GPIO 24](https://pinout.xyz/pinout/pin18_gpio24#)
18+
GND | Pin 30 | [Ground](https://pinout.xyz/pinout/ground#)
19+
20+
## Diagram
21+
22+
![Wiring Diagram](HcSr04.png)

0 commit comments

Comments
 (0)