In the context of the science, technology, engineering, arts and mathematics disciplines in education, subjects tend to use contextualized activities or projects. Educational robotics and computational thinking both have the potential to become subjects in their own right, though not all educational programs yet offer these. Despite the use of technology and programming platforms being widespread, it is not common practice to integrate computational thinking and educational robotics into the official curriculum in secondary education. That is why this paper continues an initial project of integrating computational thinking and educational robotics into a secondary school in Barcelona, Spain. This study presents a project-based learning approach where the main focus is the development of skills related to science, technology, engineering, arts and mathematics and the acquisition of computational thinking knowledge in the second year of pupils’ studies using a block-based programming environment. The study develops several sessions in the context of project-based learning, with students using the block-programming platform Scratch™. During these sessions and in small-group workshops, students will expand their knowledge of computational thinking and develop 21st-century skills. We demonstrate the superior improvement of these concepts and skills compared to other educational methodologies.