A first electrode, a second electrode, a third electrode and a fourth electrode are placed on a head of the patient. The electrodes are electrically connected to a master unit or sub-control unit that generates a first stimulation signal, during a first time period, to the first and second electrodes to stimulate the brain inside the head. The third and fourth electrodes receive a first brain signal, during a second time period, and forwards the first brain signal to the master unit or sub-control unit which analyzes the first brain signal and adapting a second stimulation signal based on information in the first brain signal.