diff options
| author | Ben Beltran <ben@nsovocal.com> | 2017-08-28 21:37:28 -0500 |
|---|---|---|
| committer | Ben Beltran <ben@nsovocal.com> | 2017-08-28 21:37:28 -0500 |
| commit | 69c48e0767172cf806a70df2ecc3a59aaefb9f2b (patch) | |
| tree | 148627bed3989237cf424f54c4728399b4e0f119 /README.md | |
| parent | a6b9035958a0e125d291ef1696c94d6a53a3c918 (diff) | |
| parent | b21a9771b4f02de35d224c898fbda5b359656e94 (diff) | |
Merge branch 'feature/rbdr-initial-dev' into develop
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 66 |
1 files changed, 64 insertions, 2 deletions
@@ -1,2 +1,64 @@ -# sorting-hat -A sorting hat, sorts you to a variety of sets of 4 +# Sorting Hat + +A sorting hat, sorts you to a variety of sets based on the assignment of +mind waves. + +## Usage + +This package can be used as a standalone executable or as a library +inside other node applications + +### As an executable + +It can be used as a local or global installation + +#### Local Install + +``` +$ npm install sorting-hat +$ npx sorting-hat +``` + +#### Global Install + +``` +$ npm install -g sorting-hat +$ sorting-hat +``` + +#### Overriding configuration in the binary + +The binary uses environment variables to override the defaults + +* `SORTING_HAT_DEVICE_LOCATION`: The path from where we'll listen to the + mindwave, defaults to `/dev/tty.MindWaveMobile-SerialPo` +* `SORTING_HAT_MAPPING_STRATEGY`: The strategy used to sort the waves, + it defaults to `tmnt`. That is also the only supported value as of + right now +* `SORTING_HAT_PORT`: The port on which we'll start the websocket server + to send state updates to the frontends + +### As a Library + +You can include it in other libraries by requiring the file. For more +information on the public API and the used data structures, please check +`doc/README.md` + +``` +'use strict'; + +const sortingHat = new SortingHat({ + deviceLocation: '/dev/tty.MindWaveMobile-SerialPo', + mappingStrategy: 'tmnt', + port: 1987 +}); +sortingHat.start(); +``` + +At the moment it's not built right, so you can't really do much with +this mode. But you can do it. + +## Further Improvements + +* Give independent weights to each wave and category so we can balance +* Allow actual use as a library |