Thingy 52 React webapp + nodejs wrapper to OSC localhost
- 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.
- Clone or download this repository.
- Make sure you have all prerequisites.
- Open terminal, navigate to the React folder of the repository:
cd React/
npm i
npm run-script build
- Navigate to myapp folder
cd myapp/
npm i
- Install a local web server: https://www.npmjs.com/package/serve
- Open terminal and run the react webapp, launching the local web server from the react build/ folder
cd React/build
serve
- Set Google Chrome to http://localhost:5000
- Connect the Thingy
- Open another terminal and navigate to the myapp folder
cd myapp
npm run quiet
or, with verbose logging:
npm run verbose
- You should now receive OSC data locally on port 30200
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"
currently only page data are routed over OSC, i.e. motion if motion page is shown etc.