Skip to content

Commit 81261c2

Browse files
committed
Readme Updated
1 parent 6d35d0e commit 81261c2

File tree

1 file changed

+28
-24
lines changed

1 file changed

+28
-24
lines changed

README.md

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ To use the script, run it from the command line with various options:
5151
### Options
5252

5353
- `-p`, `--port` <port>: Specify the serial port to use (e.g., COM5, /dev/ttyUSB0).
54-
- `-b`, `--baudrate` <baudrate>: Set the baud rate for serial communication (default is 230400).
54+
- `-b`, `--baudrate` <baudrate>: Set the baud rate for serial communication. The script will first attempt to use 230400, and if that fails, it will automatically fallback to 115200.
5555
- `--csv`: Enable CSV logging. Data will be saved to a timestamped file.
5656
- `--lsl`: Enable LSL streaming. Sends data to an LSL outlet.
5757
- `-v`, `--verbose`: Enable verbose output with detailed statistics and error reporting.
@@ -74,30 +74,8 @@ To use the script, run it from the command line with various options:
7474
- **Sampling Rate**: `UNO-R3 : 250 Hz` , `UNO-R4 : 500 Hz`
7575
- **Data Format**: `float32`
7676

77-
78-
### Script Functions
79-
80-
`auto_detect_arduino(baudrate, timeout=1)`: Detects an Arduino connected via serial port. Returns the port name if detected.
81-
82-
`read_arduino_data(ser, csv_writer=None)`: Reads and processes data from the Arduino. Writes data to CSV and/or LSL stream if enabled.
83-
84-
`start_timer()`: Initializes timers for 1-second and 10-minute intervals.
85-
86-
`log_one_second_data(verbose=False)`: Logs and resets data for the 1-second interval.
87-
88-
`log_ten_minute_data(verbose=False)`: Logs data and statistics for the 10-minute interval.
89-
90-
`parse_data(port,baudrate,lsl_flag=False,csv_flag=False,verbose=False)`: Parses data from Arduino and manages logging, streaming, and GUI updates.
91-
92-
`cleanup()`: Handles all the cleanup tasks.
93-
94-
`main()`: Handles command-line argument parsing and initiates data processing.
95-
9677
## Applications
9778

98-
> [!IMPORTANT]
99-
Before using the below Applications make sure you are in application folder.
100-
10179
### GUI
10280

10381
- `python gui.py`: Enable the real-time data plotting GUI.
@@ -108,7 +86,7 @@ To use the script, run it from the command line with various options:
10886

10987
### HEART RATE
11088

111-
- `python heartbeat.ecg.py`:Enable a GUI with real-time ECG and heart rate.
89+
- `python heartbeat_ecg.py`:Enable a GUI with real-time ECG and heart rate.
11290

11391
### EMG ENVELOPE
11492

@@ -122,6 +100,32 @@ To use the script, run it from the command line with various options:
122100

123101
- `python ffteeg.py`: Enable a GUI with real-time EEG data with its FFT.
124102

103+
### Keystroke
104+
105+
- `python keystroke.py`: On running, a pop-up opens for connecting, and on pressing Start, blinks are detected to simulate spacebar key presses.
106+
107+
## Running All Applications
108+
To run all applications together:
109+
110+
```bash
111+
python app.py
112+
```
113+
114+
This will launch a Web interface. Use the interface to control the applications:
115+
116+
1. Click the **`Start LSL Stream`** button to initiate the LSL stream.
117+
2. Then, click on any application button to run the desired module.
118+
119+
### Available Applications
120+
- `ffteeg`: Perform FFT analysis on EEG data.
121+
- `heartbeat_ecg`: Analyze ECG data and extract heartbeat metrics.
122+
- `eog`: Process and detect blinks in EOG signals.
123+
- `emgenvelope`: Analyze EMG signals for muscle activity or gesture recognition.
124+
- `keystroke`: Monitor and analyze keystroke dynamics.
125+
- `game`: Launch an EEG game fro 2 players(Tug of War).
126+
- `csv_plotter`: Plot data from a CSV file.
127+
- `gui`: Launch the GUI for real time signal visualization.
128+
125129

126130
## Troubleshooting
127131

0 commit comments

Comments
 (0)