You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
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 desc
Connection
16
GPIO 23
Message pending LED anode
20
Ground
Message pending LED cathode
22
GPIO 25
Connection status LED red anode
24
GPIO 8
Connection status LED green anode
26
GPIO 7
Connection status LED blue anode
25
Ground
Connection 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.
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