Programming – Remote Control Statements

Slides:



Advertisements
Similar presentations
While Loops and If-Else Structures
Advertisements

Vex Robotics Program five: using the radio control transmitter.
Loops (Part 1) Computer Science Erwin High School Fall 2014.
Autonomy using Encoders Intro to Robotics. Goal Our new task is to navigate a labyrinth. But this time we will NOT use motor commands in conjunction with.
RobotC Programming for LEGO Mindstorms NXT Carnegie Mellon Dacta Lego Timothy Friez Miha Štajdohar SOURCES:
Intro to Java while loops pseudocode. 1 A “Loop” A simple but powerful mechanism for “making lots of things happen!” Performs a statement (or block) over.
LEGO Mindstorms NXT Carnegie Mellon Dacta Lego Timothy Friez Miha Štajdohar SOURCES:
CHAPTER 2 ANALYSIS OF ALGORITHMS Part 2. 2 Running time of Basic operations Basic operations do not depend on the size of input, their running time is.
Remote Control- RobotC
Programming – Touch Sensors Intro to Robotics. The Limit Switch When designing robotic arms there is always the chance the arm will move too far up or.
ROBOTC for VEX Online Professional Development
Open and Closed Loops Standard Grade Computing Studies.
LabVIEW Program and Data Flow Review LabVIEW Robotics Fundamentals.
Coding for the FIRST Tech Challenge: RobotC
Teacher/Mentor Institute Using easyC Joel Kirkland July 30-31, 2015.
ROBOTC Training Session 1 Timothy Friez 1/10/08 Revision 1.
What is a Robot?. Slices Anthropomorphism Remote Control Programmed Repetition Autonomy Artificial Intelligence 13-2.
Vex Robotics Program six: combining autonomous and radio control.
Programming – Remote Control Statements Intro to Robotics.
Real-Time Data through Data Hubs. Begin by adding a basic Move block, 5 rotations 75% power.
RobotC Remote Control. Learning Objectives: Focusing on Virtual World with Physical Examples Understand Real-Time Joystick Mapping Understand how to use.
Flow Control in Imperative Languages. Activity 1 What does the word: ‘Imperative’ mean? 5mins …having CONTROL and ORDER!
Control Output Devices Hyper linking. Back to Input Devices Back to Input Devices What Are Control Output Devices? These are devices that are associated.
Istituto Tecnico Industriale A.Monaco EURLAB Control a Servo Motor If you want to swing an robot arm or … steer a robot you need a special motor (Servo).
ROBOTC for CORTEX Teacher Training © 2011 Project Lead The Way, Inc. Automation and Robotics VEX.
After Construction Name: Per #:.
Basic Steps in Programming
If you want to swing an robot arm or …
ROBOTC for VEX Online Professional Development
Advanced EasyC Jim Cline July 20-21, 2017.
Robotics Programming Using Shaft Encoders
Jeopardy $100 $100 $100 $100 $100 $200 $200 $200 $200 $200 $300 $300 $300 $300 $300 $400 $400 $400 $500 $500.
Movement using Shaft Encoders
Using Encoders to go Straight
Programming – Touch Sensors
Using variables, for..loop and functions to help organize your code
When I want to execute the subroutine I just give the command Write()
While Loops and If-Else Structures
Basketball Drill Programming Alternatives
Controlling YOUR ROBOT
Programming - Timers Intro to Robotics.
Introduction to Object-Oriented Programming with Java--Wu
Auto Straightening using VEX Shaft Encoders
Programming Basics - RobotC
Programming – Remote Control Statements
Algorithms Take a look at the worksheet. What do we already know, and what will we have to learn in this term?
While Loops and If-Else Structures
Robotics Programming 9/18/2015.
While Loops and If-Else Structures
While Loops and If-Else Structures
While Loops and If-Else Structures
Programming - Buttons Intro to Robotics.
Robotics Programming 9/18/2015.
if-else Structures Principles of Engineering
Automation with RobotC
Robotics Programming Using Shaft Encoders
Programming - Buttons Intro to Robotics.
Robotics Programming Using Shaft Encoders
Remote Control For this activity we will use the Squarebot
1.15: Dual Joystick Control (Tank)
While Loops and If-Else Structures
Marty the Robot.
RobotC Programming for LEGO Mindstorms NXT
Automation with RobotC
Robotics Programming Using Shaft Encoders
Selections and Loops By Sarah, Melody, Teresa.
While Loops and If-Else Structures
1.3.7 High- and low-level languages and their translators
While Loops And If-Else Structures
Is there an alternative to copy-paste for repeating code?
Presentation transcript:

Programming – Remote Control Statements Intro to Robotics

Radio Control Setup

At this point we have supplied the power value at the time the program is written. But, now that we want the robot to respond to real-time commands from the transmitter, a pre-typed value WILL NOT WORK! Instead, the motor power needs to be set based on a live value set from the transmitter.

The joystick’s vertical position is measured by a device called a POTENTIOMOTOR. The signal is translated into a value from 127 to -127, with 0 being the neutral central position.

In RobotC, write the following code.

What happens when you start the code?

The while( ) loop Your robot has the ability to respond to the transmitter input only ONCE. In order to maintain continued control, the motors need to continue being updated with values from the transmitter.

while ( ) When the program reaches most commands, it runs them and then moves on. When the program reaches a while ( ) loop, however, it steps INSIDE the loop, and stays there as long as the while ( ) loops decides that it should. The commands repeat over and over.

Test the robot’s movement using the radio transmitter. TRY THIS! What happens?