Software code for the EmotiBit. If you just want to visualize and parse data from the EmotiBit (for Windows/ macOS), you can simply download the software directly in releases.
If you want to modify the code(or build the tools in Linux), below are the requirements to build the project.
- OF 11
https://openframeworks.cc/download/NOTE: ofxEmotiBit is not yet compatible with 0.11.2. OF v0.11.0 can be downloaded here https://openframeworks.cc/versions/v0.11.0/
Note: If downloading zip instead of git clone
be sure to remove -master
from the folder name to avoid path discrepancies
- ofxNetworkUtils - https://github.com/bakercp/ofxNetworkUtils
- ofxOscilloscope - https://github.com/produceconsumerobot/ofxOscilloscope
- ofxThreadedLogger - https://github.com/produceconsumerobot/ofxThreadedLogger
- ofxBiquadFilter - https://github.com/mrbichel/ofxBiquadFilter
- ofxJSON - https://github.com/jeffcrouse/ofxJSON
- EmotiBit_XPlat_Utils - https://github.com/EmotiBit/EmotiBit_XPlat_Utils
- ofxLSL - https://github.com/EmotiBit/ofxLSL
- NOTE: for lsl support, if developing with visual studio, code should be compiled for x64
- liblsl64.dll should always be in the same folder as the .exe (i.e. EmotiBitOscilloscope/bin/liblsl64.dll)
- liblsl64.lib should always be linked to in under solution properties->linker->general->additional library directories and solution properties->linker->input-> additional dependencies
- both of these libs are handled properly by default, but should be considered if deviating from release code
- The project is built on a 64-bit architecture. Make sure you are on a machine that support
x64
build platform. - Required to build EmotiBit FirmwareInstaller
- ofxSerial - https://github.com/bakercp/ofxSerial
- ofxIO - https://github.com/bakercp/ofxIO
- If you are using the new M1 macs, then make sure to use Rosetta installed in xcode.
- EmotiBit software has not been officially tested on M1/M2 macs. If you are building on these systems, please let the community know on the forum about any additional steps you had to take get the source to build!
- Adding paths to Library search paths
- Check if the directory paths for the files
liblsl64-static.a
andliblslboost.a
are already present in theproject
>Build Settings
>Library Search Paths
. If they are not present, follow the below steps:- Select your project in the Target group(in xcode project navigator), go to Build Settings tab, and add the following path in the Library Search Paths section:
../../../addons/ofxLSL/libs/labstreaminglayer/lib/osx
- Select your project in the Target group(in xcode project navigator), go to Build Settings tab, and add the following path in the Library Search Paths section:
- Check if the directory paths for the files
- You will require a version of gcc on your linux machine. Depending on the version, we need to install the appropriate OpenFrameworks code base. You can check the gcc verison on you system using the following command:
gcc --verison
. - If you do not have gcc installed, you can install it using
sudo apt install gcc
. - For EmotiBit software development, we have used gcc v6+, which has been tested to run with the OpenFrameworks
- Download and extract the Openframeworks package for the gcc version on your system. Openframeworks Downloads
- You can use the following command to extract
tar xvzf <filename>
- You can use the following command to extract
- Follow the official openframeworks guide to set things up. Follow the instruction mentioned below during running
install_dependencies.sh
- At one point during installation of the dependencies(after you run the shell script
install_dependencies.sh
), a prompt will ask the user to press Y/N to installPrompt: “installing OF dependencies with -hwe-18.04 packages, confirm Y/N ?
. Press N. Link to article
- At one point during installation of the dependencies(after you run the shell script
- At this point, you should have
- all the dependencies installed(successfull run of
install_dependencies.sh
) - compiled OF (successfull run of
./compileOF.sh
) - project Generator set up(successfull run of
./compilePG.sh
)
- all the dependencies installed(successfull run of
- Now, we need all the repositories required to build EmotiBit_Oscilloscope. Install all the addons mentioned in the
Requirements
section.- You can either download the repositories, or use
git clone <repo name>
to get the addons. If git is not installed on your system, usesudo apt install git
to install git.
- You can either download the repositories, or use
- You will also require net-tools to run certain commands required by the Oscilloscope. Run
sudo apt install net-tools
- That's it! You now are ready to run EmotiBit Oscilloscope!
- To run the Oscilloscope, cd to
(OF_ROOT)/addons/ofxEmotiBit/EmotiBitOscilloscope
. Run the commandmake Debug
ormake
to create the release executable. - Note: When trying to run the EmotiBit Oscilloscope, if you get an error with the following message
cannot open shared object file: No such file or directory : liblsl-1.14.0-manylinux2010_x64
, you will have to update theLD_LIBRARY_PATH
variable.- To do so, run the following command in terminal:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/that/leads/to/EmotiBitOscilloscope/bin
- replace
/path/that/leads/to/EmotiBitOscilloscope/bin
with the actual path to the bin folder in EmotiBitOscillosocpe directory - Compile the source again.
- To do so, run the following command in terminal: