This paper describes the content of an undergraduate class in mechatronics at Santa Clara University. We describe a competition-based framework that has been integrated with rigorous labs to develop skills in core areas that are needed to complete a course capstone project successfully. Students learn the basics of mechatronics and, in the project, develop a mobile robot. The project varies from year to year. Our course is based on the low-cost Arduino platform. This paper briefly discusses pedagogical strategies and tools that have been used at other schools, and then focuses on describing the lecture, laboratory, and project components of our course.