adds installation instructions for raspi0w

This commit is contained in:
Lars Berning 2021-05-04 21:27:44 +02:00
parent 4e844b0722
commit b16fc34ea0
No known key found for this signature in database
GPG Key ID: 028E73C9E1D8A0B3
3 changed files with 39 additions and 9 deletions

View File

@ -7,7 +7,7 @@ An open source rowing monitor for rowing exercise machines. It upgrades a rowing
Open Rowing Monitor is a Node.js application that runs on a Raspberry Pi and measures the rotation of the rower's flywheel to calculate rowing specific metrics, such as power, split time, speed, stroke rate, distance and calories.
I currently develop and test it with a [Raspberry Pi 3 Modell B](https://www.raspberrypi.org/products/raspberry-pi-3-model-b/) and a Sportstech WRX700 waterrower. But it should run fine with any rowing machine that uses an air or water resistance mechanism as long as you can add something to measure the speed of the flywheel.
I currently develop and test it with a Sportstech WRX700 waterrower. But it should run fine with any rowing machine that uses an air or water resistance mechanism as long as you can add something to measure the speed of the flywheel.
I suspect it works well with DIY rowing machines like the [Openergo](https://openergo.webs.com) too.
## Features
@ -47,7 +47,7 @@ Fitness Machine Service (FTMS) is a standardized GATT protocol for different typ
## Installation
You will need a Raspberry Pi 3 or 4 with a fresh installation of Raspberry Pi OS Lite for this. Connect to the device with SSH and initiate the following command to set up all required dependencies and to install Open Rowing Monitor as an automatically starting system service:
You will need a Raspberry Pi Zero W, Raspberry Pi 3 or a Raspberry Pi 4 with a fresh installation of Raspberry Pi OS 10 (Lite) for this. Connect to the device with SSH and initiate the following command to set up all required dependencies and to install Open Rowing Monitor as an automatically starting system service:
```zsh
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/laberning/openrowingmonitor/HEAD/install/install.sh)"

View File

@ -4,7 +4,10 @@ This guide roughly explains how to set up the rowing software and hardware.
## Requirements
* A Raspberry Pi that supports Bluetooth Low Energy (Pi 3 or Pi 4). Probably this also runs on other devices.
* A Raspberry Pi that supports Bluetooth Low Energy. Probably this also runs on other devices.
* Raspberry Pi Zero W or WH
* Raspberry Pi 3 Model A+, B or B+
* Raspberry Pi 4 Model B
* An SD Card, any size above 4GB should be fine
* A rowing machine (obviously) with some way to measure the rotation of the flywheel
* the WRX700 has a build in reed sensor that I can directly connect to the GPIO pins of the Raspberry Pi

View File

@ -19,19 +19,23 @@ cancel() {
exit 1
}
print "Installation script for Open Rowing Monitor"
print
print "This script will set up Open Rowing Monitor on a Raspberry Pi 3 / 4 with Raspberry Pi OS (Lite)."
print "You should only run this script on a SD Card that does not contain any important data."
print "This script will set up Open Rowing Monitor on one of the following devices"
print " Raspberry Pi Zero W or WH"
print " Raspberry Pi 3 Model A+, B or B+"
print " Raspberry Pi 4 Model B"
print
print "You should only run this script on a SD Card that contains Raspberry Pi OS 10 (Lite)"
print "and does not contain any important data."
OSID=$(grep -oP '(?<=^ID=).+' /etc/os-release | tr -d '"')
if [[ $OSID != "raspbian" ]]; then
print
cancel "This script currently only works on Raspberry Pi OS, you will have to do a manual installation."
fi
VERSION=$(grep -oP '(?<=^VERSION=).+' /etc/os-release | tr -d '"')
if [[ $VERSION != "10 (buster)" ]]; then
print
print "Warning: So far this install script has only been tested with Raspberry Pi OS 10 (buster)."
print "You are running Raspberry Pi OS $VERSION, are you sure that you want to continue?"
fi
@ -48,8 +52,31 @@ sudo apt-get -y dist-upgrade
sudo systemctl disable bluetooth
sudo apt-get -y install bluetooth bluez libbluetooth-dev libudev-dev git
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
print
ARCHITECTURE=$(uname -m)
if [[ $ARCHITECTURE == "armv6l" ]];
then
print "You are running a system with ARM v6 architecture. Official support for Node.js has been discontinued"
print "for ARM v6. Installing experimental unofficial build of Node.js..."
NODEJS_VERSION=v14.16.1
sudo rm -rf /opt/nodejs
sudo mkdir -p /opt/nodejs
sudo curl https://unofficial-builds.nodejs.org/download/release/$NODEJS_VERSION/node-$NODEJS_VERSION-linux-armv6l.tar.gz | sudo tar -xz --strip 1 -C /opt/nodejs/
sudo ln -sfn /opt/nodejs/bin/node /usr/bin/node
sudo ln -sfn /opt/nodejs/bin/node /usr/sbin/node
sudo ln -sfn /opt/nodejs/bin/node /sbin/node
sudo ln -sfn /opt/nodejs/bin/node /usr/local/bin/node
sudo ln -sfn /opt/nodejs/bin/npm /usr/bin/npm
sudo ln -sfn /opt/nodejs/bin/npm /usr/sbin/npm
sudo ln -sfn /opt/nodejs/bin/npm /sbin/npm
sudo ln -sfn /opt/nodejs/bin/npm /usr/local/bin/npm
else
print "Installing Node.js..."
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
fi
print
print "Installing Open Rowing Monitor..."