Skip to content

An old treadmill turned into a web controlled walking pad using an Arduino, a RaspberyPi, and a two channel optically isolated relay module.

Notifications You must be signed in to change notification settings

Leo-Berman/Treadmill-To-Walking-Pad

Repository files navigation

Our final writeup for this project! (Note the html website is only chrome compatible at the moment and I haven't yet been able to figure out how to launch the Svelte site from Github Pages so if you want to check it out you have to run it on your local machine).

In terms of the languages we used, LaTeX was only used for the final paper write up and the C++ was auto-detected where we were actually using Arduino. We really hope you guys enjoy this paper. Here's our google drive with pictures and videos.

Note: I need to add the part about setting up a venv for the site :o.

Setting up to launch on startup

  1. Run this command to generate a service
sudo nano /lib/systemd/system/tread.service
  1. Enter this in the text file
[Unit]
 Description=My Sample Service
 After=multi-user.target

 [Service]
 Type=idle
 ExecStart=/home/laufband/Treadmill-To-Walking-Pad/site/venv/bin/flask --app /home/laufband/Treadmill-To-Walking-Pad/site/webserver.py run -h 10.0.0.91
 Restart=on-failure

 [Install]
 WantedBy=multi-user.target
  1. Run these two commands
sudo systemctl daemon-reload
sudo systemctl enable tread

Getting Started

Download this github repository.

Set up wiring as found in our final paper

Flash the Arduino

  1. Download the Aduino IDE and open the file to be flashed (Treadmill_Controller_1.ino).
  2. Plugin the Arduino and flash the Arduino.
  3. Connect the Arduino to the same device running the server. In our case this is the Raspberry Pi.
  4. Start the web server.

Run the Server on the Local Network

From the downloaded github repository main file.

cd site
flask --app webserver run --host your_local_ip

your_local_ip/ is the plain html and bootstrap site your_local_ip/fancy is the Svelte site

Running / Building the Svelte App

cd site/my-app
pnpm -i

Run the site locally

pnpm run dev

Build the site

pnpm run build

About

An old treadmill turned into a web controlled walking pad using an Arduino, a RaspberyPi, and a two channel optically isolated relay module.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published