A flipped classroom is a pedagogical method that flips traditional lectures and homework. In the case of a flipped classroom, the traditional lecture is viewed at home before class and homework activities are completed in the classroom with the tutor present to guide students in their work. At present, the above-mentioned flipped classroom has become increasingly popular, and sometimes controversial, within higher education. In this paper, we describe the flipped classroom example for Python programming to control I/O devices with Raspberry Pi. First, the tutor uploads the lecture notes onto Moodle. Secondly, students read the lecture notes prior to the class. Students can then ask questions on the Moodle Forum if there are any questions about the class notes. Thirdly, the students attend the class. As part of the class activities, students form into 10 groups. Each group creates a Python programme based on topics related to the class note, one hour is permitted for this activity. This is an example of a group activity. Next, each group will demonstrate the Python programme they have created to the tutor and other students in a 5-minute presentation. Following this, the tutor and other students will provide comments on the demonstration. Students will then complete a self-reflection journal about the flipped classroom on Moodle after the class. The tutor evaluates each journal written by the students. In this paper, a description of the Python programmes aims to control 8 LEDs is given as an example of a flipped classroom. Finally, the tutor added a questionnaire about the flipped classroom onto Moodle at the end of the semester. Collated questionnaire responses show that students felt the flipped classroom was appealing and helped improve programming skill. Thus, the author concludes that the flipped classroom is engaging and an effective way of teaching.