This study presents an application of sensing technology in a teaching and learning environment. In a general instruction environment, most instructors teach and manage about thirty students in a classroom. However, a teacher cannot control the degree of concentration and learning status for each student simultaneously, which causes ineffective learning for some students. For this reason, this study utilizes a learning concentration detection system through a combination of sensor and context aware technology in the learning environment. This system includes a pressure detection sensor and facial detection sensor to detect facial expressions, eye activities and body movements. This system utilizes an artificial bee colony algorithm to optimize the system performance to help a teacher immediately understand the degree of concentration and learning status of students. Based on this, an instructor can give appropriate guidance to several unfocused students at the same time. The experimental results indicate that the proposed method improves the searching process and enables the system to achieve better performance.