Programming - Buttons Intro to Robotics.

Slides:



Advertisements
Similar presentations
Creating a Basic Calculator using Microsoft Excel Leah Drauch West Point Middle School.
Advertisements

Vex Robotics Program five: using the radio control transmitter.
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.
Robot C Ready, SET, Go! Workshop SDSU, Fall 2013.
V EX C OACHES ' T RAINING October 12, Agenda for Today 9 – 10 AM : Tina Reeves and the Engineering Notebook 10 – Noon : Finish Building, Basic Robot.
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.
Programing Concept Ken Youssefi/Ping HsuIntroduction to Engineering – E10 1 ENGR 10 Introduction to Engineering (Part A)
RobotC Programming for LEGO Mindstorms NXT Carnegie Mellon Dacta Lego Timothy Friez Miha Štajdohar SOURCES:
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.
Testbed: Exercises.
What is RobotC?!?! Team 2425 Hydra. Overview What is RobotC What is RobotC used for What you need to program a robot How a robot program works Framework.
ROBOTC for VEX Online Professional Development
ROBOTC for VEX On-Site Professional Development
Coding for the FIRST Tech Challenge: RobotC
1 Documenting Your Project. 2 Documenting your Project Insert Banner Comments in your code Comment - coding statement used by humans not the compiler.
Available at: Lesson 3.6 – Program Line Follower in Autonomous Mode Program Line Follower in Autonomous Mode.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering –Intro to the Robotics –Introducing the IC –Discuss.
Variables and Functions. Open your Encoder program Let’s begin by opening the “Labyrinth Auto Straight” code. Save this file as Labyrinth with variables.
Website Editing From Gingerweb The Image Gallery.
Change in your CAD Project File - it happens all the time in robotics.
Vex Robotics Program six: combining autonomous and radio control.
Programming - Buttons. Ch 5-8 Joysticks work by moving the stick along an axis and thus any value between 127 & -127 can be sent. With the buttons they.
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.
Go to your Blog URL: Then click on “Log in” Your students do not need to remember their password, they can select.
 We all have less! › Less time. › Less resources.  Skype will help you gain some of your time back. › Instead of having to move and physically ‘meet’
Vex Robotics Program four: reversing and turning.
While and If-Else Loops ROBOTC Software. While Loops While loop is a structure within ROBOTC Allows a section of code to be repeated as long as a certain.
RobotC Remote Control. Learning Objectives: Focusing on Virtual World with Physical Examples Understand Real-Time Joystick Mapping Understand how to use.
Programming - Motion Intro to Robotics. Motors and Sensors Setup The first thing we need to do is tell ROBOTC that we have motors on our robot. Choose.
Automation and Robotics.  First you select the platform type so that you can use Natural Language PLTW.
Vex Robotics program three: using motors and sensors together.
Part 1 Learning Objectives To understand that variables are a temporary named location to store data and that programmers work with different data types.
Introduction to Programming in RobotC
Whatcha doin'? Aims: To start using Python. To understand loops.
Using the Lego Mindstorms Edu NXT Software
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Intro to the Robotics Introducing the IC Discuss.
ROBOTC for VEX Online Professional Development
Welcome to Arduino A Microcontroller.
ROBOTC for VEX On-Site Professional Development
Advanced EasyC Jim Cline July 20-21, 2017.
Robotics Programming Using Shaft Encoders
Programming – Using a Range Finder
Week 2: QUIZ RETAKE LOG INTO YOUR PERSONAL FOLDER NOW.
Programming - Motion Intro to Robotics.
Movement using Shaft Encoders
Using Encoders to go Straight
Autonomy using Encoders
Programming – Touch Sensors
By Willem Scholten Learning Access Institute
Programming – Using a Range Finder
Automation and Robotics
Programming - Timers Intro to Robotics.
Auto Straightening using VEX Shaft Encoders
Programming – Remote Control Statements
Programming Basics - RobotC
Programming – Remote Control Statements
Python programming exercise
Programming - Buttons Intro to Robotics.
RobotC While loop When and how to use the while loop
if-else Structures Principles of Engineering
Robotics Programming Using Shaft Encoders
Robotics Programming Using Shaft Encoders
Remote Control For this activity we will use the Squarebot
Programming In Lesson 4.
RobotC Programming for LEGO Mindstorms NXT
Robotics Programming Using Shaft Encoders
under the direction of Professor Susan Rodger
Presentation transcript:

Programming - Buttons Intro to Robotics

Ch 5 & 6 Joysticks work by moving the stick along an axis and thus any value between 127 & -127 can be sent. With the buttons they are either pushed or not pushed. So only SPECIFIC values can be sent.

Fear of Disqualification? You added the wait1Msec( ) command in the beginning of the code to give you a chance to move out of the way before commands are given. But what happens if you accidentally touch the joystick? Or what happens if the signal is given BEFORE your timer runs out?

Remote Start?

Open the program we were working on the last time we met. Compile and download the program. Test the button function.

Use an Idle Loop

Your program should look like this Make sure you SAVE this file in you’re MY DOCUMENTS folder.

What about the button on the robot? We first need to add the sensor as a “touch” type sensor. Make sure the button itself is plugged into INT1.

Choose the sensors 1-8 tab. In “in1” for the “name” enter button Choose the sensors 1-8 tab. In “in1” for the “name” enter button . For the “type” choose “Touch

“If” statement Remember that IF statements can be used to create “conditional” commands that will NOT loop.

If-Else

Lets add the “IF-ELSE” statement The condition here is called “Sensorvalue” and the sensor is the name we used in the setup menu, “button”. We are setting the condition equal to ZERO because when the button is OPEN we want to be able to use the RC. The false condition or “else” is that if the button does NOT read ZERO or ONE(closed) we turn OFF the motors for 3 seconds. Notice this is within the while loop.

Let’s Check your understanding Using “comments” IN YOUR OWN WORDS, insert them under each control structure and command statements explaining what they do. Place your name in the code (using comments) and print out the code and turn it in.

Ready for Soccer? Compile and test your program Test your idle loop Test your IF/ELSE statement Test your timer Get my approval for competition