@@ -5,7 +5,7 @@ The BioAmp Tool is a Python script designed to interface with an Arduino-based b
5
5
## Features
6
6
7
7
- ** Automatic Arduino Detection:** Automatically detects connected Arduino devices via serial ports.
8
- - ** Data Reading:** Reads and processes data packets from the Arduino.
8
+ - ** Data Reading:** Read ModularEEG P2 format data packets from the Arduino's serial port .
9
9
- ** CSV Logging:** Optionally logs data to a CSV file.
10
10
- ** LSL Streaming:** Optionally streams data to an LSL outlet for integration with other software.
11
11
- ** Verbose Output:** Provides detailed statistics and error reporting, including sampling rate and drift.
@@ -26,16 +26,24 @@ The BioAmp Tool is a Python script designed to interface with an Arduino-based b
26
26
1 . Ensure you have Python 3.x installed.
27
27
2 . Install the required Python libraries:
28
28
``` bash
29
- pip install pyqtgraph pyqt5 numpy pyserial pylsl
29
+ pip install -r requirements.txt
30
30
```
31
31
32
32
# # Usage
33
33
34
34
To use the script, run it from the command line with various options:
35
35
36
- ` ` ` bash
37
- python bioamp_tool.py [options]
38
- ` ` `
36
+ First Create Virtual Environment
37
+
38
+ ` ` ` bash
39
+ python -m venv venv # Create Virtual Environment
40
+ .\venv\Scripts\activate #to activate environment
41
+ ` ` `
42
+ Then,
43
+
44
+ ` ` ` bash
45
+ python bioamp_tool.py [options]
46
+ ` ` `
39
47
40
48
# ## Options
41
49
@@ -48,17 +56,6 @@ python bioamp_tool.py [options]
48
56
49
57
# # Script Functions
50
58
51
- <<< <<< < HEAD
52
- - ` auto_detect_arduino(baudrate, timeout=1)`
53
-
54
- Detects an Arduino connected via serial port. Returns the port name if detected.
55
-
56
- - ` read_arduino_data(ser, csv_writer=None)`
57
-
58
- Reads and processes data from the Arduino. Writes data to CSV and/or LSL stream if enabled.
59
-
60
- - `start_timer ()`
61
- =======
62
59
` auto_detect_arduino(baudrate, timeout=1)`
63
60
64
61
Detects an Arduino connected via serial port. Returns the port name if detected.
@@ -68,43 +65,26 @@ Detects an Arduino connected via serial port. Returns the port name if detected.
68
65
Reads and processes data from the Arduino. Writes data to CSV and/or LSL stream if enabled.
69
66
70
67
`start_timer ()`
71
- >>>>>>> dad0c5ce4e301f8187a6a047dda450833539ab61
72
68
73
69
Initializes timers for 1-second and 10-minute intervals.
74
70
75
- <<< <<< < HEAD
76
- - ` log_ten_second_data(verbose=False)`
77
- =======
78
71
` log_one_second_data(verbose=False)`
79
- >>>>>>> dad0c5ce4e301f8187a6a047dda450833539ab61
80
72
81
73
Logs and resets data for the 1-second interval.
82
74
83
- <<< <<< < HEAD
84
- - ` log_ten_minute_data(verbose=False)`
85
-
86
- Logs data and statistics for the 10-minute interval.
87
-
88
- - ` parse_data(port, baudrate, lsl_flag=False, csv_flag=False, verbose=False)`
89
- =======
90
75
` log_ten_minute_data(verbose=False)`
91
76
92
77
Logs data and statistics for the 10-minute interval.
93
78
94
79
` parse_data(port, baudrate, lsl_flag=False, csv_flag=False, gui_flag=False, verbose=False)`
95
- >>>>>>> dad0c5ce4e301f8187a6a047dda450833539ab61
96
80
97
81
Parses data from Arduino and manages logging, streaming, and GUI updates.
98
82
99
- <<< <<< < HEAD
100
- - ` main()`
101
- =======
102
83
` init_gui()`
103
84
104
85
Initializes and displays the GUI with six real-time plots, one for each bio-signal channel.
105
86
106
87
` main()`
107
- >>>>>>> dad0c5ce4e301f8187a6a047dda450833539ab61
108
88
109
89
Handles command-line argument parsing and initiates data processing.
110
90
@@ -137,9 +117,4 @@ If GUI is not enabled, you can use an LSL viewer (e.g., BrainVision LSL Viewer)
137
117
138
118
We are thankful to our awesome contributors, the list below is alphabetically sorted.
139
119
140
- <<< <<< < HEAD
141
- - [Payal Lakra](https://github.com/payallakra)
142
-
143
- =======
144
- - [Payal Lakra](https://github.com/payallakra)
145
- >>>>>>> dad0c5ce4e301f8187a6a047dda450833539ab61
120
+ - [Payal Lakra](https://github.com/payallakra)
0 commit comments