Year 6 Exam  >  Year 6 Notes  >  Year 6 Computing  >  Programming with sensors

Programming with sensors | Year 6 Computing PDF Download

Understanding Computers in Everyday Life

  • Computers are integrated into many devices and physical systems that we encounter in daily life, extending beyond laptops, tablets, and desktop computers.
  • When a computer is part of a larger system that involves various types of inputs and outputs, it is termed as a control system.
  • A control system revolves around a computer processor that stores programs and processes information.
  • Information for processing is derived from a variety of input devices.
  • Output from the computer processor can be directed to physical output devices such as motors, lights, and sound generators. It can also be used to control robotic components.
  • Some input devices require human interaction, like keyboards, touchscreens, and voice control systems.
  • Other input devices enable computers to autonomously gather information about conditions and respond to them without human intervention. These are akin to our human senses and are known as sensors.

Making sense of our senses

Our human experience is enriched by our five senses, each playing a unique role in how we perceive and interact with the world around us.
Programming with sensors | Year 6 Computing

The Role of Our Senses

  • Sight, hearing, touch, taste, and smell are the five primary senses that help us gather information about our environment.
  • Specialized organs or structures in our bodies are responsible for collecting this sensory information.
  • Through nerve cells, this information is transmitted as electrical signals to the brain for processing.
  • Our brain interprets these signals and sends responses to various parts of the body to react accordingly.

Example: Smelling Burnt Toast

Consider the scenario of someone burning toast and how our senses and brain work together to respond:

  • Your nose detects the smell of burning, signaling potential danger.
  • The olfactory nerves carry this information to the brain for analysis.
  • Based on past experiences, the brain recalls appropriate actions to take in such a situation.
  • Instructions are sent out to react, such as shouting a warning and seeking help to prevent further damage. 

Question for Programming with sensors
Try yourself:
What is responsible for collecting sensory information in our bodies?
View Solution

Computers can have senses too

  • Sensors play a crucial role in enabling computers to perceive and respond to their environment, much like our human senses. They collect data about nearby conditions, transmitting this information as electrical signals through wires and cables to the computer's control system.
  • Input Processing in Computers: Similar to how our brain processes signals from our senses, these input signals are received by the computer processor—the component responsible for handling information and data to carry out tasks. The control system, guided by instructions stored in a program, can then respond to the received information.
  • Output Response Mechanism: The control system processes the data and issues instructions as output to various output devices. These devices help the control system react to and interact with the surrounding conditions.

Let's go back to our burning toast example:

A smoke alarm performs a function similar to that of your nose:

  • It features a detector capable of sensing minute particles of smoke in the air.
  • Upon detecting smoke particles, it transmits a signal to the computer processor housed within its plastic body.
  • The computer processor runs a stored program that dictates its response.
  • Following the program's instructions, the computer processor sends a message to the alarm's output device, instructing it to emit a loud sound. 

Programming sensors

  • When we develop computer programs for control systems involving input sensors, we frequently rely on a concept known as selection.
  • Selection in programming involves the program making decisions based on certain conditions or responses.
  • These conditions are often determined by information provided by sensors.
  • Programs utilizing sensors typically contain commands like WHEN, IF, and THEN.
  • Control system programs employing sensors generally follow a specific algorithm structure:
    • WHEN: When a signal is received from the sensor indicating a detection, a message is sent to the computer processor.
    • IF: If the signal indicates changes or a specific level has been reached.
    • THEN: Instructions are sent to output devices to activate components like motors, lights, or sound devices.
  • Example Scenario: Consider a program designed for a smoke detector sensor. In this case:
    • WHEN: Upon receiving a signal from the sensor indicating smoke detection, a message is relayed to the computer processor.
    • IF: If the signal suggests a change in conditions or a specific threshold has been met.
    • THEN: Instructions are issued to the output devices, triggering actions like activating a motor, light, or sound device.

Programming with sensors | Year 6 Computing

What are program events?

  • In control systems, programs often incorporate a programming concept known as an EVENT.
  • An event signifies a specific occurrence or happening. Programs utilize events to pause and wait until a particular event occurs before executing the next command.
  • These programs frequently include keywords like WHEN and UNTIL to denote conditions based on events.
  • Here's an example of what the program for the alarm sound generator might resemble:
    • WHEN it receives the signal from the smoke sensor indicating smoke detection (the event),
    • the sound generator will continuously play the alarm sound UNTIL the reset button is pressed.

Programming with sensors | Year 6 Computing

Control Systems and Sensors in Everyday Life

Computers and sensors play vital roles in controlling various conditions in different settings.

  • Home Lighting Control: In residential settings, sensors are utilized to manage external lighting. For instance, when light sensors detect darkness outside, the control system triggers the outdoor lights to illuminate.
  • Heating System Regulation: Many households employ control systems with devices like thermostats to regulate heating. These thermostats have temperature sensors that communicate with the central processor to adjust heating based on room temperature.
  • Temperature Maintenance: The system maintains the temperature at a pre-set level to ensure comfort and efficiency.

Real-world Examples of Control Systems

  • Automatic Windscreen: Wipers in Cars Some cars are equipped with a system that can activate the windscreen wipers automatically when a built-in water sensor detects rain falling on the windscreen. This technology ensures that the driver's visibility remains clear during rainy conditions.
    Programming with sensors | Year 6 Computing
  • Baby Monitoring System: A baby monitoring device is designed to detect sounds like a baby crying and alert parents through a flashing red light as an output signal. Modern versions may also include cameras for visual monitoring and sensors that mimic a parent's touch by detecting movement and breathing.
    Programming with sensors | Year 6 Computing
  • Early Warning System for Volcanic Eruptions: Specialized control systems include sensors that can detect unusual chemicals in the air at the onset of a volcanic eruption. Once detected, these systems send out warnings to alert people to evacuate to safety zones, potentially saving lives.
    Programming with sensors | Year 6 Computing
The document Programming with sensors | Year 6 Computing is a part of the Year 6 Course Year 6 Computing.
All you need of Year 6 at this link: Year 6
19 videos|26 docs|3 tests

Top Courses for Year 6

19 videos|26 docs|3 tests
Download as PDF
Explore Courses for Year 6 exam

Top Courses for Year 6

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

Previous Year Questions with Solutions

,

Free

,

pdf

,

MCQs

,

Summary

,

Exam

,

Sample Paper

,

Objective type Questions

,

video lectures

,

Programming with sensors | Year 6 Computing

,

Semester Notes

,

practice quizzes

,

Viva Questions

,

past year papers

,

Programming with sensors | Year 6 Computing

,

Programming with sensors | Year 6 Computing

,

shortcuts and tricks

,

Important questions

,

Extra Questions

,

mock tests for examination

,

study material

,

ppt

;