|
пре 19 часа | |
---|---|---|
HuzzahAPDistance | пре 19 часа | |
static | пре 20 часа | |
templates | пре 20 часа | |
.gitignore | пре 20 часа | |
README.md | пре 19 часа | |
app.py | пре 1 дан | |
requirements.txt | пре 1 дан | |
run.sh | пре 20 часа |
A work about false narratives, dead journalists, and not-so-innocent bystanders.
to be continued
$ cd HuzzahAPDistance
$ cp config.h.example config.h # and edit it with SSID and Password for the AP (pick something hard to guess)
Upload to the Huzzah board, and connect it to HC-SR04 like this:
Connect PC to the WiFi network you’ve defined at config.h
Browse to http://192.168.115.23. You should see a report of list of current client MAC addresses (typically, only yours), and a link to a JSON end point that returns distance.
$ virtualenv venv
$ . venv/bin/activate
$ pip install -r requirements.txt
$ cd ../static/js
$ cp config.js.example config.js # and edit it according to room size, etc.
$ ./run.sh
Browse to http://localhost:5000 to see the work.
Browse to http://localhost:5000/p to see distance as a progress bar (this can help callibrate static/js/config.js
)