Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PR-Holonet Release Repo for Hackaday Prize 2018 Competition

License

NotificationsYou must be signed in to change notification settings

pr-holonet/pr-holonet-hackaday

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pi pin #Pi pin descRockBLOCK pin #RockBLOCK pin desc
25V power85v In
6Ground7Ground
8TXD0 (GPIO 14)2RXC
10RXDO (GPIO 15)3TXD
12GPIO 18 (PCM_CLK)10RI (Ring Indicator)
14Ground6Ground

LED pinouts follow. This table, and the code, assume that the connectionstatus LED is an RGB LED with common cathode, and the message pending LEDis a simple one-color LED. Obviously if you package the LEDs somehow thenyou can run a common ground and won't need to use all the ground pins.

Each LED anode will need a current-limiting resistor in series, sized tosuit the RPi's GPIO limits (17 mA limit at 3.3V is recommended).

Pi pin #Pi pin descConnection
16GPIO 23Message pending LED anode
20GroundMessage pending LED cathode
22GPIO 25Connection status LED red anode
24GPIO 8Connection status LED green anode
26GPIO 7Connection status LED blue anode
25GroundConnection status LED cathode

holonet-web

This is the web service that runs on the Raspberry Pi. The end userconnects to this to send and receive messages.

It requires Python 3, Flask, phonenumberslite, pyserial,and the RPi.GPIO module. In production deployments we use Gunicorn andsupervisord. The frontend uses yarn for package management, withbootstrap and webpack.

Installation instructions

In production, files are placed in/opt/pr-holonet/holonet-web, withlog files and mailboxes placed in/var/opt/pr-holonet.

# As root:curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -echo 'deb https://dl.yarnpkg.com/debian/ stable main' \    >/etc/apt/sources.list.d/yarn.listapt -y updateapt -y install python3 python3-flask gunicorn3 python3-rpi.gpio \    supervisor yarn hostpad isc-dhcp-server dnsmasq pip3 install flask-webpack phonenumberslitemkdir -p /opt/pr-holonetmkdir -p /var/opt/pr-holonet/log# Place the holonet-web source code in /opt/pr-holonet/holonet-web.cd /opt/pr-holonet/holonet-webyarn installnode_modules/webpack/bin/webpack.jsln -s /opt/pr-holonet/holonet-web/pr-holonet-web.conf /etc/supervisor/conf.d/service supervisor reload

Developer installation instructions

You can run the app using the Flask debug server. If you don't havea RockBLOCK attached and aren't running on a Raspberry Pi, then thoseparts will just disable themselves.

We use pycodestyle, pylint, pytest, setuptools, webpack, and yarn.Use the same apt commands as above.

# Create and activate a virtualenv if you want.pip3 install --user flask flask-webpack phonenumberslite \    pycodestyle pylint pyserial pytest RPi.GPIO setuptoolscd pr-holonet/holonet-webyarn installnode_modules/webpack/bin/webpack.js# Or for live updates during development:node_modules/webpack/bin/webpack.js --watchpycodestylepython3 setup.py lintpython3 setup.py testpython3 app.py

Network configuration feature

holonet-web includes a feature where it can reconfigure the Wi-Fi betweeneither the default client mode or acting as an access point.

The configuration for this is stored in/var/opt/pr-holonet/system_manager/ap.json.

If you end up stuck, you can reset the network using:

cd pr-holonet/holonet-web# Reset to client mode:sudo python3 -m holonet.system_manager# Reset to AP mode (using the settings in ap.json):sudo python3 -m holonet.system_manager true

About

PR-Holonet Release Repo for Hackaday Prize 2018 Competition

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors5


[8]ページ先頭

©2009-2025 Movatter.jp