Skip to content

Commit

Permalink
Initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
mesca committed Nov 6, 2023
1 parent ee12765 commit d5100dd
Show file tree
Hide file tree
Showing 20 changed files with 197 additions and 470 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9, "3.10"]

steps:
- uses: actions/checkout@v2
Expand Down
49 changes: 49 additions & 0 deletions README.md
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
```
17 changes: 0 additions & 17 deletions README.rst

This file was deleted.

45 changes: 45 additions & 0 deletions examples/audio.yaml
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

27 changes: 0 additions & 27 deletions examples/dynamic.yaml

This file was deleted.

30 changes: 0 additions & 30 deletions examples/dynamic_prefixed.yaml

This file was deleted.

50 changes: 0 additions & 50 deletions examples/multi.yaml

This file was deleted.

22 changes: 0 additions & 22 deletions examples/sine.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions examples/sinus.yaml

This file was deleted.

27 changes: 0 additions & 27 deletions examples/test.yaml

This file was deleted.

24 changes: 24 additions & 0 deletions examples/uart.yaml
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

25 changes: 10 additions & 15 deletions setup.cfg
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
Expand All @@ -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

Expand Down
Loading

0 comments on commit d5100dd

Please sign in to comment.