English | 中文
EmBCI is fully open source on Github since release v.0.2.3!
This README file is only a quick start. Check out full documentation here.
EmBCI is still under developing. Any contributions are welcomed.
Contents
EmBCI is the abbreviation of Embedded Brain-Computer Interface, a bio-signal acquisition and processing platform.
It is composed of a high precision, wearable, 8-channel bio-signal measuring hardware and a signal processing python library optimized for embedded devices.
Users can quickly develop their own applications based on EmBCI. And EmBCI comes with some interesting apps, check out here!
- Fast prototyping: EmBCI provide lots of data streaming and IO interfaces. Build your app within 100 lines of code!
- Signal processing: baseline-correction, denoising, time-frequency algorithms, and many many more.
- Multiple Biosignal: support EEG, EMG, ECG... We implemented gesture-recognition based on sEMG and SSVEP Speller based on EEG in the same platform.
- It's embedded: 40mm x 40mm wearable device, small but powerful, get rid of PC!
- WiFi connection: data visualization, files management, visual stimulus keyboard and more Web UI applications are accessable by simply connect to a hotspots.
EmBCI Shield
is a PCB board designed to measure, denoise, buffer and transfer bio-signals.
Currently, the stable version is EmBCI Shield Rev.A7
.
It integrates:
- ADS1299 from Texas Instruments:
- Low-noise 8-Channels 24-Bits ADC for Biopotential Measurements
- Power management chips and others
EmBCI Shield can also be used as an extension shield for OrangePi/RaspberryPi and other 40-Pin compatiable develop boards.
- on embedded linux: wifi, serial, sysgpio, spidev
- on others platforms: wifi, serial/usb
pip install embci
git clone --depth=1 -b release https://github.com/hankso/EmBCI.git
cd EmBCI
sudo python -m pip install -r ./requirements.txt
python setup.py build && sudo python setup.py install
For those who want to build their applications based on EmBCI, you may want to install embci
in developer mode with:
git clone -b master https://github.com/hankso/EmBCI.git && cd EmBCI
sudo python -m pip install --editable .
Then you can code and test your app.
EmBCI provides lots of useful input/output interfaces including an extendible WebUI so that one can easily implement applications. See embci.io, embci.webui and embci.apps for more information.
On arm
and aarch64
embedded Linux platforms, setup.py
will also install Linux service configuration files.
To autostart EmBCI applications at boot on PC and other systems, you have to config autorun manually.
TODO: only install the package is not enough
EmBCI has a Linux Service interface to work properly on embedded devices.
Both System-V style
scripts and System D service manager
scripts are provided.
See files/service for more details.
EmBCI use INI-Style configuration files with an extention .conf
.
Here's an example:
# File: EmBCI/files/service/embci.conf # Lines beginning with '#' or ';' are ignored and will be used as comments. [Path] DIR_BASE = /usr/share/embci [Platform] HARDWARE = Rev.A7 BOARD = Orange Pi Zero Plus 2 [GPIO] PIN_ESP32_DRDY = PD11 PIN_ILI9341_DC = PA02 [Network] WEBUI_HOST = 0.0.0.0 WEBUI_PORT = 8080
When you type import embci
, it will automatically search for configuration files and load them into embci.configs
with following priority(from low to high):
project config file: "${EmBCI}/files/service/embci.conf" system config file: "/etc/embci/embci.conf" user config file: "~/.embci/embci.conf"
On Windows system:
project config file: "${EmBCI}/files/service/embci.conf" system config file: "${APPDATA}/embci.conf" user config file: "${USERPROFILE}/.embci/embci.conf"
See docs/Configurations for more details.
Get full documentation here.
Folder | Description |
---|---|
embci | Data-processing algorithms, IO, WebUI and frameworks |
embci.apps | Basic applications and an example app project |
embci.gyms | Output classification result to gyms to control games |
embci.io | Stream Readers/Commanders, data save/load functions |
embci.utils | Miscellaneous tools: useful decorators and functions |
embci.viz | Visualization: SPIScreen, Matplotlib, and Qt |
embci.webui | Web-based User Interface |
files/avr | On shield Atmega328P firmware (Deprecated) |
files/esp32 | On shield ESP32 firmware and burning tools |
files/cases | 3D models files in SolidWorks and STL format |
files/hardware | EmBCI Shield files in Eagle format |
files/service | Linux service configurations |
Currently two environments have been implemented to use mind-control results to control movement. See embci.gyms for more.
Written by @ buaawyz. See game installation guide.
Run python main.py
first and then from gyms import PlaneClient as Client
See more at gym_torcs. And embci.io.TorcsCommander.
MIT license. See LICENSE.txt