Lesson 3 Sub-Routines.

Slides:



Advertisements
Similar presentations
This symbol is used to; Start a flow-chart; Stop a singe flow-chart (or all flow charts in that program); Mark the Start of a Sub-Routine (a separate.
Advertisements

Flowol The Task.
The Dewi Sant Greenhouse Control Project Lesson 2.
Unit 7.6 Lesson 2 Goals Identify and use flowchart symbols. Plan a sequence of events and incorporate them into a flowchart. Create a simple flowchart.
Bridge Traffic Lights Mimic Name:. Learning Objective How to use Flowol and the Bridge Light Mimic to safely control a set of traffic lights Learning.
My Portfolio The area I am working on to improve my Level My end of year target is.. I am becoming more confident in this area I have met this target and.
Do it now activity Last lesson we learnt about instructions are run in a computer. Write a set of instructions that a computer could follow to make a cup.
Unit 5E – Controlling Devices
1. Know the different types of flow block 2. Understand how problems can be broken down into smaller problems.
Flowol subroutines Subroutines are used to:  Simplify your code to make it easier to read (or for someone.
Program ultrasonic range sensor in autonomous mode
Available at: Lesson 3.6 – Program Line Follower in Autonomous Mode Program Line Follower in Autonomous Mode.
This presentation is intended to offer a set of activity cards, which are ideal for introducing the Robolab. The cards cover a range of basic skills, that.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
Slide 1 Controlling Sequences of Events Traffic lights Event table.
Control & Programming The Sports Coupe Mimic Controlling the Car Alarm.
Your Brief: You are the lead programmer responsible for designing and implementing the control program that controls all input and output devices in the.
Software using a flowchart method of creating a control programme.
My first robot programming - Simple “Go” Young Joon Kim MSRDS First Beginner Course – STEP4.
4) Design the logic to control the motor on a simple remote control car. There are two buttons on the remote control for the motor. If neither button is.
Lesson 2 Inputs. Lesson objectives To understand how inputs can be used to control an output To consider how to make mimics more realistic.
PLC APPLICATIONS MODULE 3 Time sequence processes.
Casne.ncl.ac.uk Taking care of the CrumbleBot Please do NOT stress the robot's motors 1.Do NOT push the robot 2.Do NOT hold the.
Control Technology START What is control technology? What is this diagram called? In which program have you used these before? Lets Go!
Algorithms and Flowcharts
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
Sensors Control Systems with Flowol.
Controlling input/output devices using Flowol
7. State Diagram SWE SOFTWARE PROCESS MODELING - AMAN QUADRI.
Programming Scratch to Control a K’NEX Fairground Ride
Programming Design ROBOTC Software Computer Integrated Manufacturing
Sequential Circuits: Latches
قانون المنافسة ومنع الاحتكار
Raspberry Pi: External Inputs & Outputs
Traffic light programming challenges
Creating a completed control system
Logic Gates Practical Objective: to develop an understanding of logic circuits and truth tables.
Sequencing Learning Objective: to be able to design algorithms that use sequencing.
Raspberry Pi with Pibrella
Series Circuits Lesson 8.
BBC Microbit.
An Introduction to VEX IQ Programming with Modkit
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 5.
Global Challenge Flashing Wheels Lesson 3.
Game Controller Lesson Two.
Sequential Circuits: Latches
Global Challenge A bag for Julienne Lesson 3.
Line Following Behavior
Lesson 4 Variables.
Global Challenge Flashing Wheels Lesson 3.
Global Challenge A bag for Julienne Lesson 3.
Global Challenge Flashing Wheels Lesson 3.
Global Challenge A bag for Julienne Lesson 3.
Global Challenge Flashing Wheels Lesson 3.
Lesson 18 – how to add a new button for pivot right
I can program behaviours using inputs and outputs
How electronic systems work using the Systems approach.
Global Challenge A bag for Julienne Lesson 3.
I can control a motor and use a sensor
Global Challenge A bag for Julienne Lesson 3.
Global Challenge A bag for Julienne Lesson 3.
Global Challenge A bag for Julienne Lesson 3.
I can program behaviours using inputs and outputs
Global Challenge A bag for Julienne Lesson 3.
Input/ Output Machines
Global Challenge Flashing Wheels Lesson 3.
Global Challenge A bag for Julienne Lesson 3.
Global Challenge Flashing Wheels Lesson 3.
Global Challenge Flashing Wheels Lesson 3.
Presentation transcript:

Lesson 3 Sub-Routines

Lesson Objectives To understand how to use values to control systems To understand what sub routines are, and how they are used to make control technology more efficient.

It has 4 inputs. 3 buttons and a dial Task 1: Mobile This mimic is a child's cot mobile. It has 4 inputs. 3 buttons and a dial It has 6 outputs. A motor which turns the mobile, and 5 lights/motors on each vehicle

Values At the top of a mobile is a dial. We can set it to different values from 0 to 100 which increment by 5 each time How might we use this dial? What could we use it to control?

Values We can speed up the motor depending on the value of the dial above it.

Task 1: Create a flow diagram so that the motor goes forward at 20% when the value is equal to 10

Task 2: Make the motor turn faster as the value increases.

Task 3: Add 3 further flow diagram to program what will happen when the 3 buttons are pressed. Remember there are several more outputs that you can include.

These flow charts are used the control a railway crossing barrier. Start Start Start Start Train from track 1? Train from track 2? Train from track 3? Train from track 4? These flow charts are used the control a railway crossing barrier. Light on Light on Light on Light on Light off Light off Light off Light off Light on Light on Light on Light on They all makes the lights flash before they close the barrier. Why is it inefficient to write the same command 4 times? Light off Light off Light off Light off Close Barrier 1 Close Barrier 2 Close Barrier 3 Close Barrier 4

Extension: Sub Routines Sub routines are used when the same flow chart is being used several times.

Start Start Start SUB FLASH They work like this Train from track 1? Train from track 2? Train from track 3? Light on Light off SUB FLASH SUB FLASH SUB FLASH Light on Close Barrier 1 Close Barrier 2 Close Barrier 3 Light off Each of the flow charts now includes a sub routine. This makes the flow chart more efficient. It saves time for the programmer and the computer. Stop

Sub routines in the mobile Create a sub routine to program the lights and motors on the vehicles.