EEG/EMG device to facilitate rehabilitation after a stroke by providing a closed loop feedback of the brain signal with muscle signal, making the rehabilitation less painful and more effective.