Go to file
Elis Axelsson af02a907d0 Add pinouts and refactor some code 2017-08-11 08:14:38 +02:00
code Add pinouts and refactor some code 2017-08-11 08:14:38 +02:00
.gitignore Ignore /.env/ dir 2017-07-24 17:45:46 +02:00
Makefile Add pinouts and refactor some code 2017-08-11 08:14:38 +02:00
README.org Add note about copying files 2017-08-07 20:23:40 +02:00
default.nix Add deps 2017-07-24 17:19:09 +02:00
requirements.txt Added requirements.txt 2017-07-24 17:35:20 +02:00

README.org

Setup

virtualenv --no-site-packages --distribute .env
source .env/bin/activate
pip install -r requirements.txt

Connect to serial port

picocom /dev/ttyUSB0 -b115200

Copying file

ampy --port /dev/ttyUSB0 put hcsr04.py

Small card

Distance measuring

HCSR04 Pins

Trig D0 Echo D3 Vcc 5V GND GND

Set up distance measuring

import tablecode.main

tablecode.main.distance(16, 0)

Movement sensor

Sensor pins

5V 5V GND GND OUT D0

Set up movement sensor

import machine

pin = machine.Pin(0, mode=machine.Pin.IN, pull=None)

print(pin.value())