My intention is to use the TGAM EEG chip connected to an Arduino nano to flash an LED at a certain frequency when brainwaves are in the delta and theta ranges. I do not want the circuit to be reliant on a computer for processing, the goal is that it works independently of one. I am not sure how to code the arduino for this purpose, or whether I need to alter the TGAM’s output to specify the delta or theta range, or if arduino can do that. Any coding assistance or input that can be provided would be extremely helpful.
If explanations could be as detailed but simple to understand as possible, that would be ideal as I am new to coding
Have you seen some of these links?
(Read the Overview section there to see how to retrieve the band powers.)
Also section 6 here, with the actual sketch,
Thank you for your suggestion! I had not investigated those links yet, but now that I have, a few questions:
In theory the brainblinker example is pretty close to what I need, but how do you get it to blink based on theta and delta waves as opposed to attention? Is it as simple as changing readAttention to readTheta? I’m assuming you would have to change the interval too, but I don’t know to what.
Also, is there a way to make it blink only at a certain threshold of these waves? the brainblink example just blinks faster as one’s attention increases.
re: thresholding vs linear tracking
Yes of course. His current code just translates the threshold value to blink rate. Instead you would compare your value (theta in your case) to a threshold value and only blink if that is exceeded.
In actuality, neurofeedback that uses thresholding, generally employs something called “auto threshold”, where the level of the threshold is continually adjusted to achieve a certain percentage of ‘reward’ or success level. This way as the brain learns to generate more of the desired band(s), the challenge level rises, to keep progressing the direction of change.