Question on OpenBCI_GUI Networking Widget to Arduino (EMG)
Hello, I just bought a "Cyton Biosensing Board (8-channels)" and would like to work on the following task:
When the EMG signals (say Channels 1 and 2) sense that the sets of muscles contract, an Arduino UNO board would do a certain task correspondingly (say turn on a LED).
The two possible ways I can think of are:
Method 1: Cyton senses the EMG signals from two channels. OpenBCI_GUI would then do the simple analysis (unlike the complication in the signal analysis of EEG, I would just see if the EMG signal is higher than a certain threshold). Then OpenBCI_GUI would send a command to Arduino through Serial port by networking widget. Arduino board will do the corresponding actions upon receiving the commands.
Method 2: Cyton senses the EMG signals from two channels. OpenBCI_GUI would then send time domain data or FFT data or EMG data to Arduino through Serial port by networking widget. Arduino board will do the data analysis by itself and do the corresponding actions.
Which method is better?
My technical background: I am okay in ordinary Arduino C programming but have no experience in Java programming. I have installed the Processing IDE and get the IDE ready for the OpenBCI_GUI, but have no ideas on how to edit the program to achieve what I want to do in Method 1. It looks easier for me in Method 2, although I know that data analysis would be better to be done in the computer. I tried to write a simple Arduino programme for my Arduino UNO and confirmed that the OpenBCI_GUI can continuously send something to Arduino through Serial port with networking widget but I have no idea on what the OpenBCI_GUI is sending to Arduino.
Can anyone help? Thank you very much for the reading and look forward to your help!
Best wishes,
John
Comments
It is important to consider what this widget is trying to achieve. In a nutshell, we are trying to map the current flex of a muscle into the "comfortable flex range" of said muscle, and then represent that as a decimal between 0 and 1. Having the normalized value is nice because then you can apply it as scalar to any other variable, allowing for a pseudo-analog mapping of the strength of any muscle flex to an arbitrary output. In theory, if you relax, the value will be 0, and if you flex, the value will go to 1. The current EMG strength is a collection of raw voltage values averaged (or smoothed) over a known window of time. The bigger the window your averaging over, the smoother the data.