Create 3D representations of the quality of your sleep. Conencts to FitBit to get data and uses ShapeJS to create shapes.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
grabfitbitsleep.php
sleepshape.js
sleepshapegyroid.js

README.md

3DSleep

Create 3D representations of the quality of your sleep. Connects to FitBit to get data and uses ShapeJS to create shapes.

grabsitbitsleep.php needs to go on a server with OAUTH and PHP installed. Grab fitbitphp from https://github.com/heyitspavel/fitbitphp

Create a new app on http://dev.fitbit.com and add your secret and key.

Then fire up grabfitbitsleep.php in your browser, it will return x numbers in the range 1-10 each representing a 2 hour period of your sleep last night.

Head over to http://shapejs.shapeways.com/creator paste in sleepshape.js or sleepshapegyroid.js and add "text" inputs so you have x +1 in total. For the first enter 0.01 and the rest your numbers from grabfitbitsleep.php.

alt tag

Hit "run script" and it will generate a 3d viz of your sleep. each shape represents a 2 hour period of sleep and the roundedness of corners represents how restful your sleep was. sharp corners = restless.

Download your file to print locally, or have shapeways print it.