-
Notifications
You must be signed in to change notification settings - Fork 1
Installation
- If you are using an OrangePi, you need to install WiringOP for your board type first.
- If you are using a NanoPi, you need to install WiringNP for your board type first.
Well, of course, the system will not work without these packages. You may ask, how other board types can run without any dependencies; we use SYSFS interface to control GPIO pins of other boards manually. If you'd like to use SYSFS interface on OPi or NPi too, you can change the content of "ioPlatform" variable for your board type to 'sysfs'.
There are 2 ways to install this system to your SBC.
There is an automatic installation script at releases page of repository. You can use it to start the installation process.
$ sudo bash auto_install.sh
This script is going to install the system as a Systemd service automatically. Name of the service will be "realtimeio".
- NodeJS >= v10
- Git
For manual installation, you should first clone the git repository to your local board.
$ git clone https://github.com/ardaseremet/SBC-RealTimeIO.git
$ cd SBC-RealTimeIO
Then, install the NPM dependencies.
$ npm install
Next, we will create a Systemd entry for our system to run on system bootup automatically. If you don't want it, you can skip.
$ sudo nano /etc/systemd/system/realtimeio.service
After that, change the 'user', 'WorkingDirectory' and 'ExecStart' to point to the system path from the text below. Then, you can paste the contents to file and save.
[Unit]
Description=Realtime GPIO Controller for Linux SBCs
[Service]
User=${username}
Restart=always
KillSignal=SIGQUIT
WorkingDirectory=${projectPath}
ExecStart=${projectPath}/app.js
[Install]
WantedBy=multi-user.target
For the changes on systemd daemon to take effect, we need to reset daemon.
$ sudo systemctl daemon-reload
We are now ready to activate the systemd entry.
$ sudo systemctl enable realtimeio
$ sudo systemctl start realtimeio
Now, point your browser to port 80 of your SBC. If you see the homepage of system, you made it!