SOFTWARE Driving System Data Acquisition -> Assembler language Comparing -> C language Switch-case and If Statements.

Slides:



Advertisements
Similar presentations
For(int i = 1; i
Advertisements

STRING AN EXAMPLE OF REFERENCE DATA TYPE. 2 Primitive Data Types  The eight Java primitive data types are:  byte  short  int  long  float  double.
08/2012Tanya Mishra1 EASYC for VEX Cortex Llano Estacado RoboRaiders FRC Team 1817.
Introduction to Assembly language
1 ELE271 Mon. April 7, Review LPM -Morse Code Lab -.ref and.def -Multiplication, shift.
Making Choices in C if/else statement logical operators break and continue statements switch statement the conditional operator.
Templated Functions. Overloading vs Templating  Overloaded functions allow multiple functions with the same name.
1 Today’s lecture  Last lecture we started talking about control flow in MIPS (branches)  Finish up control-flow (branches) in MIPS —if/then —loops —case/switch.
CS1104 – Computer Organization PART 2: Computer Architecture Lecture 4 Assembly Language Programming 2.
Programing Concept Ken Youssefi/Ping HsuIntroduction to Engineering – E10 1 ENGR 10 Introduction to Engineering (Part A)
Robot Programming. Programming Behaviors Behaviors describe the actions and decisions of your robot.
Homework Any Questions?. Statements / Blocks, Section 3.1 An expression becomes a statement when it is followed by a semicolon x = 0; Braces are used.
Switch Switch case statements are a substitute for long if statements that compare a variable to several "integral" values ("integral" values are simply.
September 23, 2003Jeff Wilson1 The Go-Go Gantry Jeff Wilson Lee Strobridge Allison Bodis David Carlson Mark Jarrett Jeremy Paradee.
1 CS 105 Lecture 6 While Loops Wed, Feb 16, 2011, 5:13 pm.
©2006 CSUC Institute for Research in Intelligent Systems Introduction to Coding June 15, 2006.
Quiz 1 Exam 1 Next Week. Nested if Statements if (myGrade >= 80) if (myGrade >= 90) cout
Switch Statements Comparing Exact Values. 2 The Switch Statement The switch statement provides another way to decide which statement to execute next The.
PRINCIPLES OF PROGRAMMING Revision. A Computer  A useful tool for solving a great variety of problems.  To make a computer do anything (i.e. solve.
GOTO CONSIDERED HARMFUL Tarana Yar. The publishing of the paper entitled “Go To Statement Considered Harmful”, written by Edsger W. Dijkstra in 1968,
1 CSC103: Introduction to Computer and Programming Lecture No 11.
Switch Statements Comparing Exact Values. The Switch Statement: Syntax The switch statement provides another way to decide which statement to execute.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
The Software Construction Process. Computer System Components Central Processing Unit (Microprocessor)
Copyright Curt Hill The C/C++ switch Statement A multi-path decision statement.
Robot Programming. Programming Behaviors Behaviors describe the actions and decisions of your robot.
1 Chapter 3: Loops and Logic. 2 Control Statements If statement Example NumberCheck.java Relational operators (, >=, ==, !=) Using code blocks with If.
Char ch; ch ‘L’‘X’‘V’‘I’ As in Roman numerals Want to give each a value, n say switch (ch) { case ‘I’:n = 1; break; case ‘V’:n = 5; break; … default:cout.
Available at: – Program Functions to Accept Values Program Functions to Accept Values.
Spring 2009 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 8.
LESSON 4 Decision Control Structure. Decision Control Structures 1. if statement 2. if-else statement 3. If-else-if statement 4. nested if statement 5.
Data Types Always data types will decide which type of information we are storing into variables In C programming language we are having 3 types of basic.
The George Washington University Electrical & Computer Engineering Department Dr. S. Ahmadi Class 3.
Learning the Basics How to make all different kinds of knots.
IT CS 200: R EPEATATION Lect. Napat Amphaiphan. T HE ABILITY TO DO THE SAME TASK AGAIN BY AGAIN UNTIL THE CONDITION IS MET LOOP 2.
Vex Robotics program three: using motors and sensors together.
Lesson xx Why use functions Program that needs a function Function header Function body Program rewritten using a function.
Click to edit Master title style Click to edit Master text styles –Second level Third level –Fourth level »Fifth level 1 Fundamentals of Programming Most.
C syntax (simplified) BNF. Program ::= [ ] Directives ::= [ ] ::= | |… ::=#include > ::=#define.
Presentation By :- Nikhil R. Anande ( ) Electronic & Communication Engineering. 3 nd Year / 5 th Semester FACULTY GUIDE : RAHIUL PATEL SIR MICROCONTROLLER.
Program Control: Selection Subject: T0016 – ALGORITHM AND PROGRAMMING Year: 2013.
7-Nov Fall 2001: copyright ©T. Pearce, D. Hutchinson, L. Marshall Oct lecture23-24-hll-interrupts 1 High Level Language vs. Assembly.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
Add and Subtract Negative Numbers
Compound Condition Break , Continue Switch Statements in Java
Unit-1 Introduction to Java
Decisions Chapter 4.
Java for Android is specific
Programming Fundamentals
Expressions and Control Flow in JavaScript
Movement using Shaft Encoders
Title 1  Our experience drives us forward 2.
2.0 FUNDAMENTALS OF JAVA PROGRAMMING LANGUAGE
null, true, and false are also reserved.
C# Basics These slides are designed for Game Design Class
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 5.
Flow Control Statements
Hundreds board counting
Default Arguments.
Which way does the robot have to turn to get to the charger?
Conditionals.
Welcome back to Software Development!
Modules Programmers break programming problems down into smaller, reasonable units called modules, subroutines, procedures, functions, or methods When.
Program Flow.
Programming Language C Language.
Fundamental Programming
Welcome back to Software Development!
The switch Statement When we want to compare a variable against several values to see which one it has, we can use the switch statement: switch (status)
LANGUAGE EDUCATION.
Name:.
Presentation transcript:

SOFTWARE Driving System Data Acquisition -> Assembler language Comparing -> C language Switch-case and If Statements

EXAMPLE CODE #include #include int main() { float forward; float backward; float left; float right; char operation; char sensor; char rtn; switch (operation) { case'forward': case'forward': if(sensor == forward) { JMP to Assembler "forward" subroutine }break; case'backward': if(sensor == backward) { JMP to Assembler "backward" subroutine } break; break; case'left': case'left': if(sensor == left) { JMP to Assembler "left" subroutine }break; case'right': if(sensor == right) { JMP to Assembler "right" subroutine }break;default: JMP back to main() break;} return 0; }

FLOW CHART