You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Chords Java** is an open-source Java-based project to acquire, visualize, and stream real-time biopotential signals such as **ECG**, **EMG**, **EEG**, and **EOG** from BioAmp hardware. Built with JavaFX and supporting LSL (Lab Streaming Layer), it provides a reliable, low-latency interface for research, prototyping, and educational neuroscience.
| USB Serial Connection | Detects and connects to compatible development boards over USB using `jSerialComm`. Supports real-time data acquisition without missing samples. |
| LSL Streaming | Streams synchronized multi-channel signals using Lab Streaming Layer (LSL), making it compatible with tools like Chords-LSL-Visualizer, OpenViBE, and Open Ephys |
- `Java Development Kit (JDK 17+) <https://www.oracle.com/in/java/technologies/downloads/>`_ – Required for compiling and running the application
33
+
- `VS Code <https://code.visualstudio.com/>`_ or any Java-compatible IDE
34
+
- `jSerialComm <https://fazecast.github.io/jSerialComm/>`_ (already bundled in the repo)
35
+
- `Arduino IDE <https://support.arduino.cc/hc/en-us/articles/360019833020-Download-and-install-Arduino-IDE>`_ - Required to upload firmware into the arduino board
36
+
- `Chords-LSL-Visualizer <https://github.com/upsidedownlabs/Chords-LSL-Visualizer/releases/tag/v0.1.0>`_ - for live LSL streaming of data
37
+
38
+
Hardware Requirements
39
+
*********************
40
+
41
+
To use Chords-Java, you need:
42
+
43
+
- A development board running `Chords Arduino Firmware <https://github.com/upsidedownlabs/Chords-Arduino-Firmware>`_
44
+
- A USB cable
45
+
- :ref:`BioAmp Hardware<upsidedownlabs_hardware_home>` and accessories (like electrodes)
46
+
47
+
Setting up the Hardware
48
+
***********************
49
+
50
+
Connect your BioAmp signal chain:
51
+
52
+
1. Connect the gel electrodes or dry electrodes according to the type of signal being measured, such as ECG or EMG. For detailed placement guide :ref:`visit<using-gel-electrodes>`.
53
+
2. Plug the BioAmp Hardware to the development board (e.g., Arduino UNO R4, ESP32, etc.).
54
+
3. Connect the board to your laptop via USB.
55
+
4. Upload the firmware (with correct baud rate and protocol) using Arduino IDE.
56
+
57
+
Uploading the Firmware
58
+
**********************
59
+
60
+
- Go to the `Chords Arduino Firmware <https://github.com/upsidedownlabs/Chords-Arduino-Firmware>`_ repo.
61
+
- Find your board in the supported boards table.
62
+
- Copy and paste the sketch into the Arduino IDE.
63
+
- Select the correct board and COM port under **Tools**.
- Open Windows Terminal by ``Win + X`` and choose **Windows Terminal** from the menu. Alternatively, press ``Win + S``, type *Windows Terminal*, and press **Enter**.
85
+
- Use the ``cd`` (change directory) command to go to the folder where your project is located. For example:
86
+
87
+
.. code-block:: powershell
88
+
89
+
cd "C:\Users\YourName\Downloads\Chords-Java"
90
+
91
+
Replace the example path with the actual path to your project directory.
92
+
93
+
3. **Compile and Run**:
94
+
95
+
For Comp
96
+
- Use the following command to compile the code:
97
+
98
+
.. code-block:: console
99
+
100
+
javac -d bin -cp "lib/*" src/ChordsUSB.java examples/ChordsLSLStreamer.java
Copy file name to clipboardExpand all lines: software/chords/chords-python/index.rst
+96-36Lines changed: 96 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,60 +62,55 @@ Go to tools, select your board, and the correct COM port. Now, hit the upload bu
62
62
Opening Chords-Python
63
63
*********************
64
64
65
-
Follow these steps to set up and install Chords-Python:
65
+
There are two ways to use Chords-Python:
66
66
67
-
1. Ensure you have latest version of Python installed.
68
-
2. **Download the GitHub repository**:
67
+
**A. Using the `chordspy` Python Package (Recommended)**
69
68
70
-
- You can download the Chords-Python repository from GitHub by visiting the following link: `Chords-Python <https://github.com/upsidedownlabs/Chords-Python/>`_.
71
-
- Or, You can clone the repository using Git by running the following command:
69
+
**B. Running Scripts Manually from the Repository**
A virtual environment allows you to manage dependencies for your project in isolation.
74
+
This is the smoothest way to get started. Follow the steps below:
80
75
81
-
- Open a terminal or command prompt.
82
-
- Navigate to the directory where you have cloned the repository.
83
-
- Run the following command to create a virtual environment:
76
+
1. **Install Python**
77
+
Make sure latest version of Python is installed.
84
78
85
-
.. code-block:: console
86
-
87
-
python -m venv venv
79
+
2. **Create and Activate a Virtual Environment**:
80
+
81
+
- **On Windows**:
88
82
89
-
- To activate the virtual environment:
90
-
- **On Windows**:
91
83
.. code-block:: console
92
84
93
-
.\venv\Scripts\activate
85
+
python -m venv .venv
94
86
95
-
- **On macOS/Linux**:
96
-
.. code-block:: python
97
-
98
-
source venv/bin/activate
87
+
.. code-block:: console
99
88
100
-
4. **Install the Required Python Libraries**:
89
+
.venv\Scripts\activate
101
90
102
-
Once the virtual environment is activated, you need to install the required libraries for the project.
91
+
- **On macOS/Linux**:
103
92
104
-
- In the terminal or command prompt, run the following command to install the dependencies needed to run the python script listed in the `requirements.txt` file:
93
+
.. code-block:: console
94
+
95
+
python3 -m venv .venv
96
+
97
+
.. code-block:: console
98
+
99
+
source .venv/bin/activate
100
+
101
+
3. **Install the Package**:
105
102
106
103
.. code-block:: console
107
-
108
-
pip install -r requirements.txt
109
104
110
-
- This will install all the necessary Python libraries and dependencies for Chords-Python.
105
+
pip install chordspy
111
106
112
-
5. To launch the Flask server, run the following command :
107
+
4. **Launch the Web Interface**:
113
108
114
-
.. code-block:: python
115
-
116
-
python app.py
109
+
.. code-block:: console
117
110
118
-
Click on the generated link to open the web interface.
111
+
chordspy
112
+
113
+
A web interface will open where you can connect your device and access applications.
119
114
120
115
.. figure:: ./media/light-interface.*
121
116
:align:center
@@ -129,6 +124,67 @@ Click on the generated link to open the web interface.
129
124
130
125
Interface in Dark Mode
131
126
127
+
B. Running Scripts Manually (Alternative)
128
+
=========================================
129
+
130
+
If you prefer running scripts directly (for development, debugging, or customization):
131
+
132
+
1. **Download the Repository**:
133
+
134
+
- You can download the Chords-Python repository from GitHub by visiting the following link: `Chords-Python <https://github.com/upsidedownlabs/Chords-Python/>`_.
135
+
136
+
- Or, you can clone the repository using Git by running the following command:
0 commit comments