Docs for my small card

master
Elis Axelsson 5 years ago
parent b6427b3646
commit c5b2ed496f
  1. 19
      README.org

@ -9,3 +9,22 @@ pip install -r requirements.txt
#+BEGIN_SRC sh
picocom /dev/ttyUSB0 -b115200
#+END_SRC
* Small card
** Set up distance measuring
#+begin_src python
from hcsr04 import HCSR04
import time
sensor = HCSR04(trigger_pin=16, echo_pin=0)
while True:
print(sensor.distance_cm())
time.sleep(1)
#+end_src
** HCSR04 Pins
Trig -- D0
Echo -- D3
Vcc -- 5V
GND -- GND

Loading…
Cancel
Save