Cycling is a very popular activity worldwide and cyclists often listen to music while riding. This usually involves the use of a portable music player or a cellphone, which may present safety problems. Since these devices may easily distract the attention of the cyclist. This is a matter that has not received much attention but has great relevance to traffic safety. In this study, the attention level of cyclists was measured and recorded as electroencephalograms (EEGs), and discrete wavelet transforms (DWTs) based on Daubechies wavelets were used to extract the EEG features. Six different cycling activity patterns were investigated and eigenfunctions were used to classify the attention level. After feature extraction by the DWTs, support vector machines (SVMs) and general regression neural networks (GRNNs) were employed to recognize different states of mind associated with specific cycling activities. In Case I, the recognition rates of the SVM and GRNN were used to determine the state of mind associated with two different cycling activities, riding in a straight line and riding around obstacles. In Case II, rider vigilance was investigated using the SVM and GRNN for eight different cycling scenarios. The experimental results validated the proposed method and showed the brainwave patterns to be clearly associated with different cycling activities. The experimental results showed that looking at a cellphone screen or engaging in a call caused riders to miss very obvious peripheral stimuli and the use of a cellphone by a cyclist is a clear danger to the rider and traffic safety.