Back to basics
After a number of days trying to get the program working with the returnJSON() method with little success I have made the decision to return to the long-hand version where the programming is written out within the draw() method. I will then launch the timing using the millis() function.
the rough outline should be like this
draw(){
connect to headset, filter signal and return JSON object containing EEG power data
if time < 30s {play the video}
if time >30s and < 45s {play “RELAX” message and record baseline EEG }
if time > 45s { launch the application
if attentionActive = false {play the mixed videos}
if attentionActive = true{play the clear video
} }
}














