Giter VIP home page Giter VIP logo

bike-tracks's Introduction

Bike Tracks Multi-Sensory Application

Learn about this example app

Setup

  • Download this repo (either via a git clone or via the zip download)

  • Salesforce

    1. Create a Developer Edition
    2. Deploy the metadata to Salesforce by running the following in this project's root dir: Mac & Linux: SALESFORCE_USERNAME=[email protected] SALESFORCE_PASSWORD=yourPasswordAndAccessToken ./activator force:deploy Windows: SALESFORCE_USERNAME=[email protected] SALESFORCE_PASSWORD=yourPasswordAndAccessToken activator force:deploy
    3. On Salesforce in the Rental Bike tab, create a new example Rental Bike and keep track of it's ID for later use
    4. Create a new Connected App 1. Check Enable OAuth Settings 1. Set the Callback URL to http://localhost:9000/ 1. In Available OAuth Scopes select Full access (full) and click Add 1. Save the new Connected App and keep track of the Consumer Key & Consumer Secret for later use
  • Raspberry Pi

    1. Obtain a Raspberry Pi (1 or 2)
    2. Obtain the Adafruit Ultimate GPS Breakout Sensor (requires soldering) or Flora Wearable Ultimate GPS (can be used with alligator clips)
    3. Follow the setup instructions to get the GPS working with the Raspberry Pi
    4. Setup the tracker app on the Raspberry Pi
      1. Copy the raspberrypi/tracker.py file to the device
      2. In the file update the rental bike id's value with the one your created

Local Development

  1. From your project's root directory, create a new conf/local.conf file containing: salesforce.consumer.key="YOUR CONSUMER KEY" salesforce.consumer.secret="YOUR CONSUMER SECRET" salesforce.username="YOUR USERNAME" salesforce.password="YOUR PASSWORD AND ACCESS TOKEN"
  2. Start the local server: Mac & Linux: ./activator ~run Windows: activator ~run
  3. Optionally send a test location using CURL: curl -d "bike_rental_id=YOUR_RENTAL_BIKE_ID&lat=38.869903333&lon=-106.98946" http://localhost:9000/
  4. Setup the tracker app on the Raspberry Pi
    1. Make sure the device is connected to the same network as your machine
    2. Update the web connection info in the tracker.py on your device by changing the conn = ... line to the following (replacing the IP with you machine's local IP): httplib.HTTPConnection("192.168.0.5", 9000)
    3. Run the tracker script: python tracker.py

Deploy on Heroku

  1. Deploy the bike-tracks app on Heroku
  2. Setup the tracker app on the Raspberry Pi
  3. Update the web connection info in the tracker.py on your device by changing the conn = ... line to the following: httplib.HTTPConnection("yournewapp.herokuapp.com")
  4. Run the tracker script: python tracker.py

bike-tracks's People

Contributors

jamesward avatar

Watchers

James Cloos avatar rfstud.io avatar

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.