generated from timeflux/timeflux_example
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
197 additions
and
470 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
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Connect Upside Down Labs devices with Timeflux | ||
|
||
This plugin allows you to stream data from [Upside Down Labs](https://upsidedownlabs.tech/) BioAmp. Two modes are proposed: through the audio interface and through the USB interface. | ||
|
||
## Installation | ||
|
||
First, make sure that [Timeflux](https://github.com/timeflux/timeflux>) is installed. You can then install this plugin in the `timeflux` environment: | ||
|
||
``` | ||
$ conda activate timeflux | ||
$ pip install timeflux_upsidedownlabs | ||
``` | ||
|
||
## Audio interface | ||
|
||
Look at this [example graph](https://github.com/timeflux/timeflux_upsidedownlabs/blob/master/examples/audio.yaml). | ||
You can run it like this: | ||
|
||
``` | ||
$ conda activate timeflux | ||
$ timeflux -d examples/audio.yaml | ||
``` | ||
|
||
The signal can be visualized [here](http://localhost:8000). | ||
|
||
## USB interface | ||
|
||
First, you must install the firmware on the board. | ||
|
||
Download the [Arduino IDE](https://www.arduino.cc/en/Main/Software) on your computer, and then: | ||
|
||
- Start the Arduino IDE | ||
- Select the serial port under "Tools" | ||
- Select your Arduino board under "Tools" | ||
- Upload the standard firmata sketch to your Arduino with: | ||
|
||
``` | ||
File -> Examples -> Firmata -> Standard Firmata | ||
``` | ||
|
||
You're all set! | ||
|
||
An example graph can be found [here](https://github.com/timeflux/timeflux_upsidedownlabs/blob/master/examples/uart.yaml). | ||
You can run it like this: | ||
|
||
``` | ||
$ conda activate timeflux | ||
$ timeflux -d examples/uart.yaml | ||
``` |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
graphs: | ||
- nodes: | ||
- id: input | ||
module: timeflux_audio.nodes.device | ||
class: Input | ||
# params: | ||
# device: 1 | ||
- id: notch | ||
module: timeflux_dsp.nodes.filters | ||
class: IIRFilter | ||
params: | ||
filter_type: bandstop | ||
frequencies: [45, 55] | ||
order: 2 | ||
- id: bandpass | ||
module: timeflux_dsp.nodes.filters | ||
class: IIRFilter | ||
params: | ||
filter_type: bandpass | ||
frequencies: [20, 100] | ||
order: 2 | ||
- id: ui | ||
module: timeflux_ui.nodes.ui | ||
class: UI | ||
params: | ||
settings: | ||
monitor: | ||
lineWidth: 1 | ||
- id: output | ||
module: timeflux_audio.nodes.device | ||
class: Output | ||
params: | ||
amplitude: 200 | ||
# device: 4 | ||
edges: | ||
- source: input | ||
target: notch | ||
- source: notch | ||
target: bandpass | ||
- source: bandpass | ||
target: ui:audio | ||
- source: bandpass | ||
target: output | ||
rate: 10 | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
graphs: | ||
- nodes: | ||
- id: data | ||
module: timeflux_upsidedownlabs.nodes.driver | ||
class: UpsideDownLabs | ||
params: | ||
rate: 500 | ||
- id: notch | ||
module: timeflux_dsp.nodes.filters | ||
class: IIRFilter | ||
params: | ||
filter_type: bandstop | ||
frequencies: [45, 55] | ||
order: 2 | ||
- id: ui | ||
module: timeflux_ui.nodes.ui | ||
class: UI | ||
edges: | ||
- source: data | ||
target: notch | ||
- source: notch | ||
target: ui:data | ||
rate: 10 | ||
|
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,15 +1,15 @@ | ||
[metadata] | ||
name = timeflux-example | ||
description = An example Timeflux plugin | ||
name = timeflux-upsidedownlabs | ||
description = Connect to Upside Down Labs devices using Timeflux | ||
long_description = file: README.rst | ||
author = Pierre Clisson | ||
author-email = [email protected] | ||
license = MIT | ||
home-page = https://timeflux.io | ||
project_urls = | ||
Documentation = http://doc.timeflux.io/projects/timeflux-example/ | ||
Source Code = https://github.com/timeflux/timeflux_example | ||
Bug Tracker = https://github.com/timeflux/timeflux_example/issues | ||
Documentation = http://doc.timeflux.io/projects/timeflux-upsidedownlabs/ | ||
Source Code = https://github.com/timeflux/timeflux_upsidedownlabs | ||
Bug Tracker = https://github.com/timeflux/timeflux_upsidedownlabsissues | ||
classifier = | ||
Development Status :: 4 - Beta | ||
Environment :: Console | ||
|
@@ -23,18 +23,13 @@ keywords = timeflux | |
[options] | ||
packages = find: | ||
install_requires = | ||
timeflux>=0.5.3 | ||
|
||
[options.extras_require] | ||
dev = | ||
pytest>=5.3 | ||
sphinx>=2.2 | ||
sphinx_rtd_theme>=0.4 | ||
setuptools_scm | ||
docinit | ||
timeflux>=0.16.1 | ||
timeflux_audio>=0.2 | ||
timeflux_ui>=0.6.3 | ||
pyFirmata2>=2.4.5 | ||
|
||
[docinit] | ||
name = Example plugin | ||
name = Upside Down Labs plugin | ||
parent_url = https://doc.timeflux.io | ||
logo_url = https://github.com/timeflux/timeflux/raw/master/doc/static/img/logo.png | ||
|
||
|
Oops, something went wrong.