Advanced EasyC Jim Cline July 20-21, 2017.

Slides:



Advertisements
Similar presentations
Jason Howard. Agenda I. How to download robotc II. What is tele-op used for? III. How to build a basic tele-op program IV. Getting the robot to drive.
Advertisements

Dependency Analysis We want to “parallelize” program to make it run faster. For that, we need dependence analysis to ensure correctness.
Vex Robotics Introduction to Sensors. introduction to sensors Sensors assist robots in seeing and feeling the physical world through which they travel.
Programing Concept Ken Youssefi/Ping HsuIntroduction to Engineering – E10 1 ENGR 10 Introduction to Engineering (Part A)
Available at: – Program Optical Quad Encoders in Autonomous Mode Program optical quad encoders in autonomous mode.
Introduction to Sensors
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 Beginners Tyler Lutz and Keaton Bonds DRSS Enterprise.
Program ultrasonic range sensor in autonomous mode
ROBOTC for VEX On-Site Professional Development
Weston Schreiber & Joshua Gabrielse Robotics Summer Training Programming #1: EasyC Basics.
Programming Concepts (Part B) ENGR 10 Introduction to Engineering 1 Hsu/Youssefi.
Available at: Lesson 3.6 – Program Line Follower in Autonomous Mode Program Line Follower in Autonomous Mode.
Teacher/Mentor Institute Using easyC Joel Kirkland July 30-31, 2015.
BEST Robotic, Inc. easyC Breakout Session By: Guy Chetrit Programming With easyC September 15, Copyright © 2012 BEST Robotics, Inc. All rights reserved.
ROBOTC Training Session 1 Timothy Friez 1/10/08 Revision 1.
Human Vision Robot (Light Sensor) Vision White/Light: 100 Black/Dark: 0 Colors:
EasyC Programming Workshop January 30, 2008 Hauppauge High School SPBLI - FIRST Mark McLeod Advisor Hauppauge Team 358 Northrop Grumman Corp.
7.2 V battery pack and charger Put the battery in the charger station at the end of the lab. period. Red light indicates charging. Ken Youssefi Introduction.
Available at: Lesson 3.5 – Program Light Sensor in Autonomous Mode Program Light Sensor in Autonomous Mode.
Making a Timer in Alice By Jenna Hayes under the direction of Professor Susan Rodger Duke University July
Programming – Remote Control Statements Intro to Robotics.
Understanding The 2008 FRC Robot Controller Chris Gregory FRC1089 – Team Mercury
Teacher/Mentor Institute Using easyC David Dominguez June 2, 2015 Update Version.
Oregon Robotics Tournament and Outreach Program RCX Basics.
Programming with LabVIEW Intro to programming and.
Repetition everywhere – comparing while in a method and as an event Susan Rodger Duke University July 2010.
Vex Robotics program three: using motors and sensors together.
Chapter 6 Controlling Program Flow with Looping Structures.
This is a while loop. The code is done while the condition is true. The code that is done is enclosed in { }. Note that this program has three parts: Housekeeping.
Teacher/Mentor Institute Intro to easyC Programming Scott McEwen July 21-22, 2016.
By Joshua Shaw.  We have previously added a While Loop  We are now going to use it for programming the robot  We have also added two motor programs.
ROBOTC for CORTEX Teacher Training © 2011 Project Lead The Way, Inc. Automation and Robotics VEX.
CNC Motion BenchMill 6000 Machining Center
FOP: While Loops.
Introduction to Programming in RobotC
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
OpModes in FTC Eric Golde.
A Simple Quiz for Alice 3.2:
Programming and File Management Part 2
ECS10 10/10
Changing Color, Using Text Objects, and Random Selection in Alice
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Basics for Robotics Programming
Roller Coaster Design Project
Programming – Touch Sensors
Stopwatch Cards Stopwatch Cards
Chapter 4 LOOPS © Bobby Hoggard, Department of Computer Science, East Carolina University / These slides may not be used or duplicated without permission.
Automation and Robotics
Unit 2 Programming.
Programming Autonomy By Joshua Shaw.
A Simple Quiz for Alice 3.2:
Programming a Servo By Joshua Shaw.
Stopwatch Cards Stopwatch Cards
Programming - Buttons Intro to Robotics.
Lesson 3.1 Variables.
Programming - Buttons Intro to Robotics.
Stopwatch Cards Stopwatch Cards
CSCI N207 Data Analysis Using Spreadsheet
Topics Introduction to Repetition Structures
Stopwatch Cards Stopwatch Cards
Running a Java Program using Blue Jay.
If-Statements and If/Else Statements
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Oregon Robotics Tournament and Outreach Program
Stopwatch Cards Stopwatch Cards
under the direction of Professor Susan Rodger
Restricting Events Creating Conditional Events in Alice By Henry Qin
Stopwatch Cards Stopwatch Cards
Introduction to Programing the Cortex for BEST
Presentation transcript:

Advanced EasyC Jim Cline July 20-21, 2017

Advanced EasyC Variables Custom Functions Defines

Advanced EasyC Variables Variables can be used for many different purposes. Controlling the master loop Analog and digital inputs Speed controls Custom functions

Emergency Shutdown When first setting up a robot there can many times in which the robot can end up in state that needs to be shut down to prevent damage to the robot or other things. Motor and servo stalls, unresponsive controller. To do this we create a function that will shutdown all functions and create a variable that will drop out of the main loop and enter the shutdown function. Note: Robot will not function again until robot is restarted.

Emergency Shutdown Before doing anything make sure the Controller Configuration is set up with motors and servos in the correct spots.

Emergency Shutdown Add a variable that will hold the main loop control. Also add a Shutdown button pushed variable.

Emergency Shutdown Add a while loop and set the loop to run as long as the trigger is true

Emergency Shutdown Add a new custom function to shut down the motors and move servos to safe locations

Emergency Shutdown Set the motors to zero and move the servos to a safe location (0 may not be safe)

Emergency Shutdown Add the Robot_Shutdown function after the loop.

Emergency Shutdown Add a Get Joystick Digital function that gets the status of the button that will be used for shutdown

Emergency Shutdown Add an if statement that detects when the shutdown button is pushed.

Emergency Shutdown Add an assignment function inside the if statement that will set the trigger to false

Emergency Shutdown

Advanced EasyC So now we have a button that will shut the robot down if a button is pushed. What happens if they accidently press that button during the competition? The robot stops functioning and will not work until restarted. NOT GOOD So how do we fix that?

Defines Defines are in the same dialog as variables Set a define called TESTING Defines are typically all upper case to identify they are defines Set the define to 1 (true) to say that we are testing

Defines

Emergency Shutdown Add an if statement with the define TESTIN as the test. Put the shutdown code into the new if.

Defines Doesn’t a variable do the same thing? Sort-of. A variable can be changed, a define can’t. A variable is set at run-time the define at compile time.

Q and A Questions?