Giter Club home page Giter Club logo

faza's Introduction

Goldsprints

An attempt to build an application for Goldsprint competition with Arduino, Python and React.

goldsprints

How it works

  1. We use Arduino with two Hall sensors to measure the speed of the bike rollers.
  2. Measurements are sent to a Python script that parses them and sends them through WebSocket to the browser.
  3. We use Django as a backend for storing data about races and players.
  4. Dynamic pages that display speed and distances of players during a race are rendered in React.

Installation on Docker

You can build and run application inside the docker container:

  1. Build docker image: docker build . -t gs:latest --no-cache
  2. Start container: docker-compose up -d
  3. Go to http://localhost:8000 in your browser to access the application

Installation on Linux host

The application was developed and tested with: Ubuntu 15.10, Python 3.5.3 and Node.js 6.3.0.

  1. Build the static assets: npm install & npm run build
  2. Install Python dependencies: pip install -r requirements.txt
  3. Prepare the database: python manage.py migrate
  4. Start the application server: python manage.py runserver 8000
  5. Start the data receiver: python ws_server [PORT] - PORT is the USB port that receives data from Arduino, e.g. /dev/ttyACM0 on Ubuntu
  6. Go to http://localhost:8000 in your browser to access the application

Available modes

  • Event - a group of races - allows to create and perform a sequence of races by entering pairs of players
  • Quick race - a quick race between two players
  • Free ride - it just reads speed and distance from sensors and display them on screen, without time mesaurment and racing

Disclaimer

It is purely a DIY hobby project made by @elwoodxblues and @ssaleta. We build it for Polish Cycle Messenger Championships which took place in Wrocław in 2016 (link). It's not perfect, it's not always doing the measurments 100% correctly, but it's good enough that it worked for us at three goldsprints events. If you'd like to use it and need any help - feel free to contact us.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.