For decades electroencephalography (EEG), the recording of brain potentials through electrodes on the scalp, has been used to evaluate neurological disorders and to study the brain. The availability of powerful digital hardware and analysis algorithms has opened the door to the brain-computer interface (BCI) field, where the user's brain activity is directly used to issue commands to a device. Potentially, this could be helpful for people whose movements are impaired by a disease or a trauma. This book presents the development of a BCI based on the P300 and error potentials in the EEG of the user. Though both potentials have been used in previous work, here they are integrated in a single system, with newly developed algorithms, suitable for real-time application. This integration prompted for a more general way to assess the performance of a BCI than those in the literature, and a user-centered approach to this issue is proposed. The book focuses on a wide range of engineering issues, from practical ones such as synchronization, to more general questions such as performance, making it appealing to readers with interests at different levels in the BCI field.