-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* decoder test suite, recordings, CI badge * mocked AudioContext and navigator for webjack test * adds decoder - not working yet * fixed promise based tests with blue-tape * decoder works (as good as Hodor speaks 😶 ) * fixed missing return keyword * typo in tests * fixed state machine bugs; __changed frequencies:__ 7350Hz will be attenuated by webRTC codecs, which makes demodulation difficult -> new frequencies: low 2450, high 4900 * new recordings due to changed frequencies * some recording were too long, call stack size exceeded during tests; now all recordings are done with the AudioRecorder from webaudiodemos.appspot.com (instead of OS specific apps like Audacity) * extended README * shortens install commands * updated build * skipped the only not working (yet) test
- Loading branch information
Showing
16 changed files
with
652 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,44 @@ | ||
WebJack | ||
==== | ||
|
||
[![Build Status](https://travis-ci.org/publiclab/webjack.svg?branch=master)](https://travis-ci.org/publiclab/webjack) | ||
|
||
WebJack is a JavaScript library that uses [SoftModem](https://github.com/arms22/SoftModem), an Arduino library, to create two-way communication between a browser window and an Arduino. No need to install drivers. Just plug in an audio cable and read/send data from the browser. | ||
|
||
## Installation | ||
``` | ||
npm install --save webjack | ||
``` | ||
or | ||
``` | ||
bower install -S webjack | ||
``` | ||
If not already done, install the SoftModem Arduino library: | ||
[https://github.com/arms22/SoftModem](https://github.com/arms22/SoftModem) | ||
|
||
|
||
## Usage | ||
```js | ||
var connection = new WebJack.Connection(); | ||
|
||
connection.listen(function(data) { | ||
console.log('received: ' + data); | ||
}); | ||
|
||
connection.send('some data'); | ||
``` | ||
|
||
|
||
|
||
|
||
## Building | ||
|
||
webjack.js is built using a Grunt task from the source files in `/src/`, and the compiled file is saved to `/dist/webjack.js`. To build, run `grunt build`. To watch files for changes, and build whenever they occur, run `grunt`. | ||
|
||
|
||
## Testing | ||
|
||
Assuming `tape` is installed globally: | ||
``` | ||
npm test | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.