title | emoji | colorFrom | colorTo | sdk | sdk_version | app_file | pinned |
---|---|---|---|---|---|---|---|
Portiloop Demo |
💤 |
blue |
grey |
gradio |
3.12.0 |
portiloop/src/demo/demo.py |
false |
This software works with the Coral implementation of the Portiloop
EEG closed-loop stimulation device.
It enables controlling the Portiloop
from a simple Graphical User Interface (GUI).
The Portiloop
GUI is a web-based interface running as a jupyter
server.
- Connect to the
Portiloop
WiFi network. - Open your favorite web browser
- Enter the following address:
192.168.0.1:9000
You should now be connected to the jupyter
server.
If the jupyter notebook is not yet created:
- Hit
New
and selectPython 3
.
This creates a jupyter
notebook, in which you can simply paste and execute te following:
from portiloop.capture import Capture
cap = Capture()
When the jupyter notebook is created:
You can open the notebook and simply execute the cell.
The GUI now looks like this:
The Channels
pannel enables you to configure each electrode:
disabled
: the electrode is not usedsimple
: the electrode is simply used to measure signal (not recommended)with bias
: the electrode is used to measure signal and to compute a bias ("ground") signalbias out
: the electrode is used to output the bias ("ground") signal
Freq
is the desired sampling rateTime
is the maximum duration of the experiment (you can also stop the experiment manually)Recording
is the name of the.edf
output file if you wish to record the signal locally- Tick
Filter
to enable the online filtering pipeline - Tick
Detect
to enable the online detection pipeline - Tick
Stimulate
to enable the online stimulation pipeline - Tick
Record EDF
to record the signal in the file designated inRecording
- Tick
Stream LSL
to broadcast the signal on the local network via LSL - Tick
Display
to display the signal in the GUI Threshold
enables customizing the optional detection threshold from the GUI (e.g., for classifiers)- The
Clock
widget lets you select the sampling method:Coral
sets theADS1299
sampling rate to twice your target sampling rate, and uses the Coral Real-Time clock to stick to your target sampling rateADS
sets theADS1299
sampling rate to the closest compatible to your target sampling rate and uses the ADS interrupts
The Filtering
section lets you customize the filtering pipeline from the GUI.
- The
FIR filter
switch lets you select between the default low-pass FIR filter (used in the Portiloop paper), or customize this filter according to your needs (FIR order
andFIR cutoff
) Polyak mean
,Polyak std
andEpsilon
let you customize the online standardization pipeline, which also acts as a high-pass filter
The Capture
switch lets you start and stop the experiment at any point in time
Note: once the experiment is started, all widgets are deactivated until you stop the experiment.
You've just got your hands on the hardware for the Portiloop V2 (A Google Coral Mini and a PiEEG board). Here are the steps you need to follow to get started using the EEG capture, the Spindle detection software, and the TPU processing.
Find the instructions to update your Coral Dev Board Mini to the last OS version here.
(We recommend the force-fastboot method, as it works without mdt
)
These first steps will help you set up an SSH connection to the device.
- Power up the board through the USB power port.
- Connect another USB cable to the OTG-port on the board and to your linux host machine. Follow the following steps to connect to the board through serial:
ls /dev/ttyMC*
screen /dev/ttyACM0
If you see a message telling you that screen is busy, you can usesudo lsof /dev/ttyMC0
and then retry the screen step.- Login to the board using default username and password: mendel
- Once you are logged in, you can now connect to you desired wifi network using
nmtui
. - Enable SSH access:
- Execute
sudo nano /etc/ssh/sshd_config
. - Scroll down to the
PasswordAuthenticated
line and change the 'no' to a 'yes'. - Press
CTRL
+o
to save your changes, andCTRL
+x
to exit the nano editor.
- Execute
- Shutdown the device (
sudo shutdown now
). - Pull the OTG-port cable off before the Coral board reboots (which happens automatically after a few seconds as long as this cable is plugged in)
Next time you turn the Coral board on, you should be able to ssh into it, using either the ip address or the hostname. If some issues arise, make sure you are connected to the same network.
- Clone this repository in the home folder,
cd
into the cloned repository,- Run
make
and follow the instructions- Don't forget to reboot the device afterward
- Note that
make
may fail at several points during installation. Whenever it does, just callmake
again.
That's it! Your Jupyter server should now be up and running, listening on IP address 192.168.4.1 and port 8080, and automatically starting whenever the system boots up. You can now access it by typing 192.168.4.1:8080 in your browser. This should lead you to a login page where you'll be prompted for your password. If any issue arise, try with a different web browser.