From 4f631300d47cb8e39a6a2d2e78af3b614d9b8c12 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Fri, 26 Feb 2021 15:48:01 +0300 Subject: [PATCH] docs: fix sonar example --- docs/en/sonar.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/en/sonar.md b/docs/en/sonar.md index 70d4ba3b..f72bbfb4 100644 --- a/docs/en/sonar.md +++ b/docs/en/sonar.md @@ -12,11 +12,11 @@ The distance gage is attached to the body using double-sided tape. For obtaining ### Connection -Connect HC-SR04 to Raspberry Pi according to the connection diagram. Use 1.0 and 2.2 kΩ resistors and any free GPIO pins, e.g., 23 and 24: +Connect HC-SR04 to Raspberry Pi according to the connection diagram. Use 1.0 and 2.2 kΩ resistors and any free GPIO pins, e.g., 23 and 24: Connecting HC-SR04 -> **Hint** Instead of a 2.2 kΩ resistor, you can use two 1 kΩ resistors connected in series. +> **Hint** Instead of a 2.2 kΩ resistor, you can use two 1 kΩ resistors connected in series. @@ -54,8 +54,8 @@ import time import threading import pigpio -TRIG = 23 is the No. of the pin connected to the Trig contact of the distance gage -TRIG = 24 is the No. of the pin connected to the Echo contact of the distance gage +TRIG = 23 # pin connected to the Trig pin of the sonar +ECHO = 24 # pin connected to the Echo pin of the sonar pi = pigpio.pi() done = threading.Event()