Code Monkey home page Code Monkey logo

thingy_mtf_web's Introduction

Thingy 52 React webapp + nodejs wrapper to OSC localhost

Prerequisites

  • Node.js - Install Node.js (https://nodejs.org/en/)
  • Git - If you want to clone this repository, you will have to install Git. Alternatively, you can download the repository by clicking "Clone or download", and then "Download ZIP".
  • Google Chrome - As Google Chrome is currently the only browser supporting Web Blueooth, you will need it to use the web app. Type as URL: chrome://flags and enable Experimental Web Platform features
  • Web Bluetooth polyfill for Windows 10 - If you are using Windows you will have to install a polyfill to enable Web Bluetooth. A guide with download and setup instructions can be found here.

Installation instructions

  1. Clone or download this repository.
  2. Make sure you have all prerequisites.
  3. Open terminal, navigate to the React folder of the repository:
cd React/
npm i
npm run-script build
  1. Navigate to myapp folder
cd myapp/
npm i
  1. Install a local web server: https://www.npmjs.com/package/serve

USAGE

  1. Open terminal and run the react webapp, launching the local web server from the react build/ folder
cd React/build
serve
  1. Set Google Chrome to http://localhost:5000
  2. Connect the Thingy
  3. Open another terminal and navigate to the myapp folder
cd myapp
npm run quiet

or, with verbose logging:

npm run verbose
  1. You should now receive OSC data locally on port 30200

OSC paths:

    address: "/thingy/heading"
    address: "/thingy/roll"
    address: "/thingy/pitch" 
    address: "/thingy/yaw"
    address: "/thingy/quaternionX"
    address: "/thingy/quaternionY"
    address: "/thingy/quaternionZ"
    address: "/thingy/quaternionW"
    address: "/thingy/direction"
    address: "/thingy/count"
    address: "/thingy/temperature"
    address: "/thingy/pressure"
    address: "/thingy/co2"
    address: "/thingy/tvoc"
    address: "/thingy/humidity"
    address: "/thingy/colorR"
    address: "/thingy/colorG"
    address: "/thingy/colorB"

TODO

currently only page data are routed over OSC, i.e. motion if motion page is shown etc.

thingy_mtf_web's People

Contributors

stefanopier avatar spirail avatar

Stargazers

June Kuhn avatar Daniele Scarano avatar

Watchers

 avatar  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.