Www.bluesquarething.co.uk/kthree/flowol.htm Flowol subroutines Subroutines are used to:  Simplify your code to make it easier to read (or for someone.

Slides:



Advertisements
Similar presentations
Mindstorms State Machines A structured method for handling tasks and events using RoboLab and NQC Brian Smith
Advertisements

ARDUINO CLUB What we’re really doing. BASICS The setup() and loop() functions.
Revision.
Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
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.
Creating Flowcharts Principles Of Engineering
Flowol The Task.
Available at: – Program Optical Quad Encoders in Autonomous Mode Program optical quad encoders in autonomous mode.
EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming
May 12-15, 2011 (red) May 6-11, 2011 (light red) Permanent Water (blue)
©2006 CSUC Institute for Research in Intelligent Systems Introduction to Coding June 15, 2006.
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.
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lab 7P. 1Winter Quarter Stop Light Lab 7.
Programming a light sensor to follow a black line.
Forging new generations of engineers
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
Post-test Review Please try your best...ask questions and read the question completely!!!
Your Brief: You are the lead programmer responsible for designing and implementing the control program that controls all input and output devices in the.
The Skull This program makes the red eye flash on and off then the green eye flash on then off for 2 seconds each. Amend the program so that the red eye.
Software using a flowchart method of creating a control programme.
Flowol Lighthouses don’t all have the same flash pattern  Can you make your lighthouse flash with 3 long and.
W e A re L earning T o  Understand the term control and program  To understand the basic symbols used in Flowol.
Lesson 2 Inputs. Lesson objectives To understand how inputs can be used to control an output To consider how to make mimics more realistic.
Deriving Consistency from LEGOs What we have learned in 6 years of FLL by Austin and Travis Schuh © 2005 Austin and Travis Schuh, all rights reserved.
Obstacle Detection. In the previous program the robot moves forward and then checks for something in the way. As we observed it only checks for things.
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.
An Introduction to Programming Using Alice 2.2, Second Edition Chapter 7 Recursive Algorithms.
Unit 9.1_Lesson 4_CD Resource 4a_Sensors and flowcharts Sensors and Flowcharts.
Control Technology START What is control technology? What is this diagram called? In which program have you used these before? Lets Go!
4 |Multitasking Created by H. Robinson & A. Gostelow Multitasking.
Python Programming Module 4 Sensors and Loops Python Programming, 2/e1.
What is Arduino? It's an open source electronics prototyping platform: Open source: resources that can be used, redistributed or rewritten free of charge,
PHP Condtions and Loops Prepared by Dr. Maher Abuhamdeh.
4. INPUTTING THE PART (DRUMS) MUSIC TECH. Make sure you have a blank part set up and the pointer icon selected. First you need to loop the part. Hover.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
Deriving Consistency from LEGOs
Selection Learning Objective: to be able to design algorithms that use selection.
GIANT TWISTER!.
Functions and Procedures
Learning Objective: to be able to design programs that use sequencing.
TESTBED ACADEMY Final Exam.
Getting Started in RobotC
When I want to execute the subroutine I just give the command Write()
Variables Lesson 3.
Raspberry Pi with Pibrella
BBC Microbit.
Name: _______________________________
Game Controller Lesson Three.
Electromagnetic fields are magnets sensing other metal or something else it can make sound or light it can change. Electric motors are a good example of.
Scratch: selection / branching/ if / If…else / compound conditionals / error trapping by Mr. Clausen.
Lesson 3 Sub-Routines.
Selection Learning Objective: to be able to design algorithms that use selection.
Line Following Behavior
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 5.
Storing Values as Variables
Repeating Behaviors.
Line Following Behavior
Lesson 4 Variables.
Using a Drawing Robot to Make Angles (Using Rotations)
Electromagnetic fields are magnets sensing other metal or something else it can make sound or light it can change. Electric motors are a good example of.
Turn to Page S.89 Challenging Question
Iteration Learning Objective: to be able to design algorithms that use iteration.
Variables Lesson 3.
Using a Drawing Robot to Make Angles (Using Rotations)
Game Controller Lesson Four.
Obstacle Detection.
Lego MINDSTORMS EV3.
Implementing Variables in Your Programs
Iteration Learning Objective: to be able to design algorithms that use iteration.
Learning Objective: to be able to design programs that use iteration.
Presentation transcript:

Flowol subroutines Subroutines are used to:  Simplify your code to make it easier to read (or for someone else to read)  Avoid having to write the same block of code a number of times  Break a bigger problem into smaller steps

Flowol subroutines Subroutines are smaller programs which run inside larger programs  Drag out a new START block  Make the block a SUB  Give the SUB a sensible name  Code the SUB  End with a STOP block

Flowol subroutines As the Big Wheel rotates the lights need to flash on and off. Sub flashLights Turn red on Delay 1 second Turn blue on Delay 1 second Turn yellow on Delay 1 second Turn lights off Delay 1 second Stop You should be able to make the lights do more interesting flashing patterns than this

Flowol subroutines Turning the wheel… Start Is Input 1 on? If Yes Run Sub flashLights Turn Motor A Forward Loop back to Start If No Turn Motor A off Loop back to start How could you turn the lights off once they start flashing?

Flowol subroutines Key vocabulary:  Subroutine  Efficiency  Loop  Condition  Pseudo Code