Project Report

Debugging of the Energy-Efficient Streetlight

Report by:

Aninakwah Vera Yeboah

December 2, 2025

Citation

Quansah, S., Asante, V., Aninakwah, V. Y., Debrah, A. B., & Nsiah, N. A. A. (2023)

Abstract

This project engaged 68 learners aged 7–15 in developing programming debugging skills through the correction of faulty code in an energy-efficient streetlight program. The activity integrated computational thinking practices, such as pattern recognition, logical reasoning, and algorithmic correction, within a sustainability-focused engineering problem. Learners applied active recall to retrieve prior knowledge from a previous streetlight programming activity and transfer it to the debugging process.

Identifying and resolving programming errors, learners strengthened resilience, iterative problem-solving skills, and technical proficiency, aligning with Sustainable Development Goal (SDG) 7: Affordable and Clean Energy. 

This project applied constructionist principles (Papert, 1980), where learners built understanding by directly manipulating and refining real code, and problem-based learning (Barrows, 1986), situating the debugging task within a real-world context of sustainable urban infrastructure.

1.0 Introduction

Debugging is a fundamental skill in programming that enables learners to systematically identify, analyze, and fix errors to ensure a program operates as intended (McCauley et al., 2008). Beyond simple troubleshooting, debugging fosters computational thinking (Wing, 2006), critical analysis, and persistence, competencies essential for emerging programmers and engineers.

In this project, learners were presented with a malfunctioning energy-efficient streetlight program designed to conserve energy by activating only under low-light conditions. The faulty code provided an authentic scenario for applying problem-solving strategies to improve a sustainability-focused technology. Using active recall, learners retrieved concepts from a previous streetlight programming activity to identify patterns, locate the fault, and implement corrections.

The activity reinforced the iterative nature of software development, emphasizing cycles of design, testing, and refinement. By combining sustainable technology themes with coding problem-solving, the project advanced both environmental literacy and technical competence, demonstrating how STEM education can be a pathway to addressing real-world challenges such as energy efficiency and urban safety.

2.0 Method

2.1 Learner Demographics

  • Total learners: 68
  • Gender distribution: 34 males (50%), 34 females (50%)
  • Age range: 7–15 years
  • Younger learners (7–9 years): Used block-based programming (MakeCode)
  • Older learners (10–15 years): Used Python for debugging tasks

2.2 Mode of Delivery

  • Virtual Sessions: Introduced debugging concepts, computational thinking strategies, and the role of energy-efficient streetlights in sustainable urban design

  • In-Person Sessions: Hands-on debugging of provided faulty code, active recall of prior streetlight programming experience, and iterative testing to ensure functionality.

3.0 Results

3.1 Learning Outcomes

  • Learners strengthened understanding of debugging as an iterative process in programming.

  • Learners applied computational thinking strategies (pattern recognition, logical sequencing, algorithmic correction).

  • Learners reinforced prior coding knowledge through active recall.

  • Learners developed problem-solving resilience by iteratively testing and refining solutions.

  • Learners increased their awareness of energy-efficient technologies and their role in sustainability.

3.2 Project Activities

  • Introduction to debugging principles and strategies.

  • Presentation of faulty energy-efficient streetlight code.

  • Application of active recall to identify likely sources of error.

  • Code correction, testing, and validation of the streetlight functionality.

3.3 Materials Used

  • BBC micro:bit microcontrollers
  • Pre-written faulty code files (MakeCode and Python versions)
  • Light sensors and LED modules for streetlight simulation
  • Computers with MakeCode and Python

3.4 Project Code Repository

Debugged project code available at:

4.0 Discussion

Applying STEAM to Energy Efficiency Challenges:
This project integrated science (light sensing and energy concepts), technology (micro:bit programming), engineering (hardware-software interaction), arts (creative interface design for streetlight simulation), and mathematics (logical reasoning in coding). Learners applied these interdisciplinary skills to improve an energy-efficient system relevant to urban infrastructure.

Problem-Solving and Critical Thinking:
Diagnosing and repairing faulty code, learners engaged in a structured problem-solving process, enhancing computational thinking and analytical reasoning. This aligns with Wing’s (2006) assertion that computational thinking equips learners to break down complex problems into manageable components.

Creating Learning Environments for Agency:
The activity’s hands-on, problem-based format (Barrows, 1986) encouraged learners to take ownership of their solutions. The real-world sustainability context motivated persistence, and constructionist principles (Papert, 1980) supported knowledge building through direct manipulation of meaningful artifacts.

5.0 Feedback and Reflections

Learners expressed a sense of accomplishment upon seeing the corrected program successfully control the streetlight. Many reflected that debugging was initially frustrating but ultimately rewarding, as it deepened their understanding of how and why programs fail.

6.0 Challenges Faced

  • Unstable internet connectivity adversely affected the flow of the sessions.
  • Limited access to computers required some learners to wait for their peers before coding on the micro:bit, resulting in session delays and a disrupted flow.
  • No access to 3D printer or laser cutter for creating physical mounts or structural supports for the project

7.0 Conclusion

The Debugging of the Energy-Efficient Streetlight project effectively combined programming skill development with sustainability-focused problem-solving. Embedding debugging within a real-world energy efficiency scenario, learners strengthened computational thinking, resilience, and collaboration.

The project demonstrated how authentic, hands-on STEAM experiences can cultivate technical competence and civic responsibility in alignment with SDG 7: Affordable and Clean Energy.

8.0 Contributors

  • Sam Quansah – Principal Investigator & Curriculum Designer & Curriculum Designer
  • Vera Yeboah Aninakwah – Lead Facilitator & Code Developer
  • Nana Adwoa Nsiah – Instructional Facilitator
  • Victor Ofori Asante – Instructional Facilitator

9.0 References

  • Barrows, H. S. (1986). A taxonomy of problem-based learning methods. Medical Education, 20(6), 481–486.

  • McCauley, R., et al. (2008). Debugging: A Review of the Literature from an Educational Perspective. Computer Science Education, 18(2), 67–92.

  • Papert, S. (1980). Mindstorms: learners, Computers, and Powerful Ideas.

  • Wing, J. M. (2006). Computational Thinking. Communications of the ACM, 49(3), 33–35.

  • United Nations. (2015). Sustainable Development Goals – Goal 7: Affordable and Clean Energy.

Related Project Reports

Show How You Feel

Using principles of event handling and algorithmic thinking, learners developed a sense of agency in creating digital tools rather than simply consuming them.

Flash How You Feel

Creating flashing emoji displays that represented their emotions, reinforcing prior learning in event handling and algorithmic thinking while adding iterative control flow to their programming toolkit.

Monitoring Environmental Temperature

This experience supported digital literacy through coding and sensor use, scientific inquiry through real-world data collection and comparison, and environmental awareness by connecting learners’ observations to broader patterns.

Traffic Light System

The activity was anchored in an authentic local context, addressing traffic congestion challenges at Kotokuraba Market in Cape Coast.

Energy-Efficient Streetlight

The activity was anchored in an authentic local context, addressing traffic congestion challenges at Kotokuraba Market in Cape Coast.