Brain-Computer Interfaces 1: Foundations and Methods