Brain-Computer Interfaces (BCIs) have gained significant attention in recent years for their role in connecting individuals with external devices using neural signals. Electroencephalography (EEG)-based BCIs, in combination with Motorized Mini Exercise Bikes (MMEBs), have emerged as promising tools for post-stroke patient rehabilitation. Nevertheless, the EEG signal-to-noise ratio (SNR) remains a challenge, susceptible to interference from physical and mental artifacts, thereby compromising the accuracy of motor task recognition, such as pedaling. This limitation hampers the effectiveness of lower-limb rehabilitation devices. In this study, we propose a comparative study which uses Multilayer Perceptron (MLP) and Extreme Learning Machine (ELM) to accurately identify from EEG signals when a subject is engaged in pedaling tasks. The results outperform those reported in the literature, achieving a remarkable Accuracy of 0.97 and a negligible False Positive Rate close to zero, resulting in an overall performance of 0.77 and 0.24, respectively. Additionally, we conducted an evaluation of four distinct frequency bands during the filtering process, with the most promising outcomes achieved within the 3 to 7 Hz frequency band. These findings support the conclusion that our proposed methodology is well-suited for the real-time detection of lower-limb tasks using EEG signals, thus offering potential applications in the control of robotic BCIs for rehabilitation purposes.