Skip to main content
logo
Forgotten your username or password?
Home
  • English ‎(en)‎
    • English ‎(en)‎
    • Español - Internacional ‎(es)‎
    • Français ‎(fr)‎
    • Türkçe ‎(tr)‎
    • Ελληνικά ‎(el)‎
    • Module 6

      Light Control with Light Sensor

      Programming & Natural Sciences

      Module Identity

      Title
      Light control with light sensor
      Subject Areas
      Computer Science Natural Sciences Robotics
      Format
      Experiential and exploratory learning; Small group work (3-5 students); Interaction with FOSSBot sensors and environmental variables.
      Preparation Requirements
      FOSSBot connection to local network; Browser setup (Chrome/Firefox); Testing of light sensor functionality.
      Estimated Duration
      45 minutes
      Age Range
      13-14 years old (Lower Secondary)
      Keywords
      Algorithmic Thinking, Conditions, Repetitions, Sensors, Automation, Light/Dark Detection, Robot Behaviour.
      Summary

      This educational scenario bridges the gap between computer science and natural sciences by using educational robotics to detect environmental changes. Students focus on the FOSSBot's light sensor to guide the robot's behavior through the continuous alternation of light and darkness. By experimenting with varying light conditions, students observe how algorithms make decisions and adapt in real-time. The lesson emphasizes the distinction between different algorithmic repetition structures (loops) and connects visual feedback (LED colors) to system states, fostering a deeper understanding of automation.

      Introduction

      Automation relies heavily on a machine's ability to sense and react to its environment. In this lesson, students explore this concept using the FOSSBot's light sensor. The core challenge is to understand how a robot can "see" darkness or light and trigger specific actions, such as movement or visual signals.

      Through a series of five activities, students progress from discussing everyday sensors to programming complex logic. They will implement conditional structures that allow the robot to decide when to turn, when to stop, and what color to display based on light intensity. This hands-on approach demystifies how automated systems—like streetlights or smart home devices—operate in the real world.

      Prerequisite Knowledge

      • • Basic familiarity with visual programming environments (e.g., Scratch)
      • • Understanding of basic programming concepts (loops and conditions)
      • • Knowledge of what a sensor is and how it is used
      • • Basic experience using FOSSBot

      Learning Outcomes

      By the end of this module, students will be able to:

      Conceptual Understanding

      • ✓ Connect environmental conditions (light/dark) with visual and kinetic behavior
      • ✓ Interpret a robot's behavior based on sensor data
      • ✓ Understand the use of conditions for decision-making by a robot

      Programming & Implementation

      • ✓ Use and program the FOSSBot light sensor
      • ✓ Design and implement algorithmic repetition structures
      • ✓ Distinguish between different types of repetitions (while/until) in the same algorithm

      Engineering & Problem-Solving

      • ✓ Enhance understanding of the relationship between sensors and automation
      • ✓ Develop algorithmic and computational thinking through observation and reflection
      • ✓ Connect LED colors to system states (e.g., Red for Dark/Warning)

      📐 Key Logic & Control Concepts

      Conditional Logic (If Dark/Light):

      REPEAT WHILE (Is it dark?)
      DO [Turn Right] [Set Color Red]

      The robot continues an action only while the condition (darkness) is true.

      Loop Types Explained:

      • • Repeat While: Runs as long as the condition is TRUE.
      • • Repeat Until: Runs as long as the condition is FALSE (stops when it becomes true).
      • • Repeat N Times: Runs for a specific number of counts (e.g., 10 times).

      Students learn to switch the LED to Green when light is detected, indicating a "Normal Operation" status.

  • Download Lesson Plan
  • Evaluation
Close shade box
Previous section
Next section
  • Download Lesson Plan

    • Download Lesson Plan (EN) File
    • Download Lesson Plan (GR) File
    • Download Lesson Plan (ES) File
    • Download Lesson Plan (TR) File
    • Download Lesson Plan (FR) File
    • Download the course's XML file
  • Evaluation

    • d

 
Back

The European Commission support for the production of this website does not constitute an endorsement of the contents which reflects the views only of the authors, and the Commission cannot be held responsi­ble for any use which may be made of the information contained therein.

You are currently using guest access (Log in)