Introduction to programming moway



Similar documents
Tutorial 1. Introduction to robot

understanding sensors

Lego Robot Tutorials Touch Sensors

How To Program An Nxt Mindstorms On A Computer Or Tablet Computer

TETRIX Add-On Extensions. Encoder Programming Guide (ROBOTC )

MOWAY BEGINNERS MANUAL

Advanced Programming with LEGO NXT MindStorms

North Texas FLL Coaches' Clinics. Beginning Programming October Patrick R. Michaud republicofpi.org

How To Turn On A Robot On A Computer On A Black Box On A Pc Or Macbook

Blender Notes. Introduction to Digital Modelling and Animation in Design Blender Tutorial - week 9 The Game Engine

Dr Robot C# Advance Sputnik Demo Program

Programming LEGO NXT Robots using NXC

chapter 3 basic driving skills

Programming in Access VBA

Tutorial for Programming the LEGO MINDSTORMS NXT

EV3 Programming. Overview for FLL Coaches. A very big high five to Tony Ayad

Classroom Activities for the Busy Teacher: EV3

Programming the VEX Robot

STEP 7 MICRO/WIN TUTORIAL. Step-1: How to open Step 7 Micro/WIN

Getting Started in Tinkercad

EasyC. Programming Tips

CONTENTS. What is ROBOTC? Section I: The Basics

mouse (or the option key on Macintosh) and move the mouse. You should see that you are able to zoom into and out of the scene.

SpaceClaim Introduction Training Session. A SpaceClaim Support Document

C.I. La chaîne d information LES CAPTEURS. Page 1 sur 5

CNC Turning Training CNC MILLING / ROUTING TRAINING GUIDE. Page 1

A Tool must be configured to allow for CMISSync, see below for more information.

Your EdVenture into Robotics You re a Programmer

Creating Drawings in Pro/ENGINEER

Use fireworks and Bonfire night as a stimulus for programming

Dupline Carpark Guidance System

REFERENCE GUIDE 1. INTRODUCTION

IRIS OPENDOCS. Getting Started Guide. IRIS OpenDocs IRIS OpenDocs

The Basics of Robot Mazes Teacher Notes

Conditionals with Cards adapted from Code Studio, Course 2

Getting Started With DraftSight A Guide For AEC Users

Notes: If the practice takes place outdoors adult players should use the Match instead of the Fun Speeder for the exercises.

Writer Guide. Chapter 15 Using Forms in Writer

Chapter 15 Using Forms in Writer

Metatrader 4 Tutorial

Available online at Smart phone application for real-time optimization of rower movements

A BRIEF INTRODUCTION TO COMPUTER PROGRAMMING Scratch, LEGO MINDSTORMS, and Visual Basic. July 24, 2015

COMPACT GUIDE. Camera-Integrated Motion Analysis

Project Management within ManagePro

Creating Smart Models From Scan Data

2 SYSTEM DESCRIPTION TECHNIQUES

ManageMyHealth SMS Text Message Service User Guide. Medtech32. Version 20.0 (March 2012)

SE05: Getting Started with Cognex DataMan Bar Code Readers - Hands On Lab Werner Solution Expo April 8 & 9

GOALS: The goal for this session is: OBJECTIVES: By the end of the lesson participants should be able to: MATERIALS: Instructor ACTVITIES: EVALUATION:

Parking Guidance System

STEP 0: OPEN UP THE PYTHON EDITOR. If python is on your computer already, it's time to get started. On Windows, find IDLE in the start menu.

HOWTO annotate documents in Microsoft Word

Intro to 3D Animation Using Blender

TRIGONOMETRY FOR ANIMATION

IFAS Reports. Participant s Manual. Version 1.0

Ortelia Space Builder User Manual

Using Microsoft Excel to Analyze Data

The second goal is to provide a list of tips, tricks, and best known methods that have been discovered over the life span of the course.

Guide To Creating Academic Posters Using Microsoft PowerPoint 2010

FUNDAMENTALS OF ROBOTICS

Personalizing Your Individual Phone Line Setup

Photoshop- Image Editing

Turtle Beach Grip 500 Laser Gaming Mouse. User Guide

User Manual Network connection and Mobics Dashboard (MIS) software for Dryer Controller M720

AODA Mouse Pointer Visibility

Mouse and Pointer Settings. Technical Brief

Your EdVenture into Robotics You re a Programmer

Introduction to Autodesk Inventor for F1 in Schools

ClarisWorks 5.0. Graphics

Welcome to The Grid 2

Vanderbilt University School of Nursing. Running Scopia Videoconferencing from Windows

Introduction to Microsoft Publisher : Tools You May Need

Chapter 9 Slide Shows

Tutorial Creating Vector Graphics

Acclipse Web Manager Adding Links

Lab 4 - Data Acquisition

Turtle Power. Introduction: Python. In this project, you ll learn how to use a turtle to draw awesome shapes and patterns. Activity Checklist

ChamberMaster - QuickBooks Guide

How to Get High Precision on a Tablet with a Drawing-Like App. Craig A. Will. May, 2014

CNC MILLING. University for Applied Arts, Vienna Studio Prof. Lynn Compiled by Nathalie Rinne With special thanks to David Erdman

SolidWorks Building Blocks Tutorial. Toy-car

Using FM. A guide for children and their families on how to use an FM solution with hearing aids

INSTALLATION GUIDE OWNER S GUIDE

Windows 8.1 Tips and Tricks

Introduction to Autodesk Inventor for F1 in Schools

This Document Contains:

Using the UPSMON-Plus Monitoring Software

SketchUp Instructions

APPLICATION NOTE. Application Note: 4D-AN-P4012. ViSi-Genie Digital Displays. Document Date: November 19 th, Document Revision: 1.

WISER 14. By the Robosses (Nila, Ishaa, Parvathi, Shivadharshne) National Public School, Bangalore, India And Vishnu Ram

1 Different types of systems Sub-systems Different types of control systems Simple systems analysis... 10

Cycles in the Sky. Teacher Guide: Cycles in the Sky Page 1 of Discovery Communications, LLC

Developing a Sewer Inspection Robot through a Mechatronics Approach

Tutorial: Biped Character in 3D Studio Max 7, Easy Animation

SolidWorks Tutorial 4 CANDLESTICK

CONNECTING TO DEPARTMENT OF COMPUTER SCIENCE SERVERS BOTH FROM ON AND OFF CAMPUS USING TUNNELING, PuTTY, AND VNC Client Utilities

JOOMLA 2.5 MANUAL WEBSITEDESIGN.CO.ZA

2/26/2008. Sensors For Robotics. What is sensing? Why do robots need sensors? What is the angle of my arm? internal information

Transcription:

moway

Contents Contents... 1 Introduction... 2 Flowcharts... 2 Movement blocks... 5 Conditionals... 6 Loops... 7 AND/OR Operators... 8 Setting flowcharts in order... 10 www.moway-robot.com 1

Introduction In this tutorial we will be discussing some basic concepts for those new to programming the moway robot. The easiest way to begin is to start using flowcharts. We will be dealing with the basic aspects of programming, such as what a condition is, the concepts AND and OR, and how these can help us control our robot. To gain a proper understanding, examples of programs carried out in MowayWorld (moway s programming software) have been included. You can thus try to program the robot and get a better understanding of how it works. Once you have run the demonstration programs used in this tutorial, you can take the courage to advance your knowledge with more complex programs. Flowcharts Robots are controlled by programs consisting of a series of tasks that the robot performs in a specific order. Flowcharts are used in programming the moway robot. Question: What is a flowchart? Answer: A flowchart represents a program graphically using blocks and arrows. ( ) The blocks (or modules) are the actions to be performed by the robot when we program it, as illustrated below: move forward, switch a light on, check the sensors, etc. Action 1 Action 2 The arrows show the program flow, i.e. the order in which the robot will perform the actions indicated in the blocks. Etc. ( ) www.moway-robot.com 2

A set of actions is displayed below to serve us as an example of a possible program for moway. The actions are move forward and switch the light on. 1. Program start 2. To move forward for a period of 1 second. 3. To switch the front light on 4. Program end Let s now see how this program can be represented in a flowchart. As has been said before, actions are viewed inside blocks. The order of the actions is indicated by connecting these with arrows. An example of a possible set of tasks performed by the robot is shown on the right hand side: START Move forward for 1 second Switch on the front LED END This way to represent programs makes it much easier to understand, especially in the case of complex programs, with a number of actions. The actions to be performed (and their order) can be seen and understood at a brief glance. NOTE: The order of the tasks is of key importance. In the previous example, the robot moves forward with the light off, stops and then switches the light on. If we changed the order of the tasks (i.e. commanding the robot to switch on the light first and then move forward), the robot would move forward with the light on and then it would stop. www.moway-robot.com 3

The MowayWorld software allows users to program the moway using flowcharts, which makes it very easy to start working with moway. Our previous example with MowayWorld is shown below: Use the Movement -> Straight block and the Lights block. Complete the program using the Finish block. The configuration of the Movement -> Straight and Lights blocks is as follows: www.moway-robot.com 4

Movement blocks Movement blocks are used for the robot to move on its two wheels. You can command the robot to move forward, move backwards, turn round or even control each of the wheels independently. These blocks can run for both a specified and unspecified period of time and/or distance. This means you can select the robot (a) to move for some time and stop afterwards; (b) to move until travelling a distance you have fixed, or (c) to move nonstop. PUT IT TO THE TEST: You can start with a program to make moway move forward ( Movement -> Straight block). Change the parameters of the Flow control section (continuously, constant time, constant distance ) and check up on what happens. If you use a block to make moway go forward in a straight line for an indefinite period of time, and then you use the "Movement -> Rotation" block, the robot will only rotate. PUT IT TO THE TEST: Test this set of blocks on your robot. You will see that the robot only rotates without moving forward. If you wish to know why, read on. www.moway-robot.com 5

When selecting the option continuously, the robot will move forward until the next movement block is reached. However, as the next block (rotation) is right afterwards, the robot hardly has time to move forward and immediately goes on to rotate. That is why we cannot see the robot s forward movement. In order to solve it, set in the "Movement -> Straight" block either how far or how long we want the robot to move forward before rotating. Conditionals A conditional block is an action whose result depends on a condition. For example, let s say we want moway to move forward until it encounters an obstacle. When the obstacle is detected, moway will have to stop until we remove the former. Next, the robot will start moving again. That is, the condition needed for the robot to stop is that its obstacle sensors detect an obstacle in front of the robot. If there is an obstacle, the sensors will detect it and the condition will be true (green tick). At this point, the robot is supposed to stop. If there is no obstacle, the sensors will not detect anything and the condition will be false (red cross). The robot will then move forward. PUT IT TO THE TEST: Test this set of blocks on your robot. As you will see, it does not work properly. If you wish to know why, read the following passage. www.moway-robot.com 6

Loops So far, we have seen that programs have a start and an end. This is not always the case. The problem about the previous chapter was that moway would check the obstacle sensors only once, it would perform one action (moving forward if an obstacle is not detected or stopping if it is detected) and then the program would end. In order to make the previous program work correctly, it is necessary to continually check the sensors. For that purpose, we will write a looping program, that is, a closed circle : 1. Remove the Finish block. 2. Link the Stop block with the Obstacles block. 3. Finally, link the Movement -> Straight block with the Obstacles block. We have just created a loop. The robot will perform the same program over and over and check for any obstacle. PUT IT TO THE TEST: Test this program on your robot. The "Obstacle" block can be configured to check the central sensors. The Straight block is configured to perform continuously. www.moway-robot.com 7

When you switch the robot on, it will move forward. If you place your hand in front of the robot, it will stop until the hand is turned away. AND/OR Operators In the Obstacle and Line conditional blocks, you can select either AND or OR, together with what sensors you want moway to use. Let s see the difference between these two options. Question: What is the meaning of the AND/OR options? Answer: If you choose the AND option, the output of the block will be true when ALL the conditions are met. For example, if the two obstacle central sensors are activated and the AND box is ticked, the output will be true when the left central sensor detects the obstacle and the right central sensor detects another obstacle. www.moway-robot.com 8

PUT IT TO THE TEST Make a program that switches the frontal LED on when the output of the "Obstacles block is true. You will see that the LED only switches on when both of the sensors detect obstacles. However, if you choose the OR option, the output of the block will be true when ANYONE of the conditions is met. For example, if you activate the two obstacle central sensors and tick the OR checkbox, the output will be true when either the left central sensor detects an obstacle or the right central sensor detects an obstacle. www.moway-robot.com 9

PUT IT TO THE TEST Make a program that switches the frontal LED on when the output of the "Obstacles block is true. You will see that in this case the LED switches on when any of the sensors detects an obstacle. Setting flowcharts in order Finally, here are some tips for building your flowcharts: Set the blocks in a neat order to gain a clearer understanding of the program flow. The following two images show the same program. As can be seen, the left-hand image is much easier to understand. www.moway-robot.com 10

Set the true outputs of the conditionals on the same side. For example, in the case of a flowchart containing several conditional blocks, set the true output actions on the left and the true ones on the right. This is not compulsory, but it leads to a better understanding of the program. Try to avoid arrow crossing. If that happens, it is possible to modify the design through the marks that will appear whenever you place the cursor on them. www.moway-robot.com 11