EMG Controlled Chrome Dino
in Cyton
Hi everyone
When I run the Chrome Dino Script (https://docs.openbci.com/Examples/EMGProjects/EMG_Chrome_Dino_Game/) The data I can read from the data stream using the dongle is just pure noise and not modulating at all, yet I can see good results while using the openBCI GUI. What am I doing wrong?
Comments
Hojja, hello.
I believe that example was written by Eva. @evaesteban, do you have any tips for Hojja?
One possible debugging tool, may be to run the Brainflow example programs and see if the data stream you get back looks like EMG is responding your muscle movements.
https://brainflow.readthedocs.io/en/stable/Examples.html#python
William
Hi everyone,
I'm working on controlling the Dino game using EMG signals, but I'm encountering an issue. The Dino keeps jumping continuously, no matter how I adjust the threshold or time_thres values. I've tried modifying both, but the problem persists.
Could someone please help me figure out why the Dino is constantly jumping and how to fix it?
Thanks in advance!
Hi Nabi,
When you hook up the EMG electrodes as directed in the Examples doc,
https://docs.openbci.com/Examples/EMGProjects/EMG_Chrome_Dino_Game/
Have you then tried looking at the EMG channel with the GUI Time Series and GUI EMG Widgets?
https://docs.openbci.com/Software/OpenBCISoftware/GUIWidgets/#emg
https://docs.openbci.com/Software/OpenBCISoftware/GUIWidgets/#emg-joystick
That will give you an idea of how clean (versus noisy) is your EMG signal. If the GUI shows a noisy signal, that probably means your EMG electrode positions or electrodes or wires are not in the optimal positions. EMG tutorial is here:
https://docs.openbci.com/GettingStarted/Biosensing-Setups/EMGSetup/
That page also shows how to use the EMG widget.
William
hi wjcroft,
I have already tried everything you said, but it still doesn't work. In the time series, I have a stable signal and everything looks normal, but in the Dino game, it keeps jumping. I really don't know what it could be due to.
Hi Nabi,
I have not used the Python programs described in the tutorial:
https://docs.openbci.com/Examples/EMGProjects/EMG_Chrome_Dino_Game/
https://github.com/evaesteban/brainflow/tree/games/games
But it sounds to me like the 'Threshold'
flex_thresvariable is being set incorrectly. Possibly too small a value, then it gets triggered by noise.Only the
chrome_dino_v1.pyprogram does a calibration phase where this value is determined during the initial program phase. Then used later during the game phase. The other programchrome_dino_v2.pydoes not have a calibration and does not set theflex_thresvariable. Hence I do not see how the v2 program can possibly work. Withflex_thresset to0as v2 does, it will be triggered by any noise on the electrode, thus appear very jumpy / noisy.I assume you are using the v1? If that is the case, my guess given your Time Series screenshot, is that the threshold should be set to around 100 or 150 or so microvolts. You could try printing what it comes up with. Or set the value manually to several test values and see if that works any better.
William
thanks for your help, it works now.