tablecontrol/README.org

49 lines
947 B
Org Mode
Raw Normal View History

2017-07-24 17:47:30 +02:00
* Setup
#+BEGIN_SRC sh
virtualenv --no-site-packages --distribute .env
source .env/bin/activate
pip install -r requirements.txt
#+END_SRC
2017-07-24 17:50:06 +02:00
* Connect to serial port
#+BEGIN_SRC sh
2017-07-24 19:49:21 +02:00
picocom /dev/ttyUSB0 -b115200
2017-07-24 17:50:06 +02:00
#+END_SRC
2017-07-24 20:06:45 +02:00
2017-08-07 20:23:40 +02:00
* Copying file
#+BEGIN_SRC sh
ampy --port /dev/ttyUSB0 put hcsr04.py
#+END_SRC
2017-07-24 20:06:45 +02:00
* Small card
2017-08-07 20:09:29 +02:00
** Distance measuring
*** HCSR04 Pins
2017-08-11 08:28:04 +02:00
| Pin on component | Pin on card |
|------------------+-------------|
2017-08-11 11:07:06 +02:00
| Trig | D3 |
| Echo | D4 |
2017-08-11 08:28:04 +02:00
| Vcc | 5V |
| GND | GND |
2017-08-07 20:09:29 +02:00
*** Set up distance measuring
2017-07-24 20:06:45 +02:00
#+begin_src python
2017-08-11 08:28:04 +02:00
import main
2017-07-24 20:06:45 +02:00
2017-08-11 08:28:04 +02:00
main.distance()
2017-07-24 20:06:45 +02:00
#+end_src
2017-08-07 20:09:29 +02:00
** Movement sensor
*** Sensor pins
2017-08-11 08:28:04 +02:00
| Pin on component | Pin on card |
|------------------+-------------|
| 5V | 5V |
| GND | GND |
2017-08-11 08:40:56 +02:00
| OUT | D2 |
2017-08-07 20:09:29 +02:00
*** Set up movement sensor
#+begin_src python
2017-08-11 08:28:04 +02:00
import main
2017-08-07 20:09:29 +02:00
2017-08-11 08:28:04 +02:00
main.movement()
2017-08-07 20:09:29 +02:00
#+end_src