Principles of Engineering Refresher�
PRESENTER: MASTER TEACHER ERIC RICE �DATE: AUGUST 10TH, 2022
Refresher Description
Participants will use the V5 Brain and new V5 sensors in combination with existing Vex Sensors to use VexCode V5 to complete programming tasks associated with Unit 3.1 including 3.1.7 and Marble Sorter 3.3.1. Participants can then continue to work and refine their skills with VexCode V5 using the new V5 Brain and associated sensors or work through another POE activity of choice. The workshop will be equipped with the following hands-on activities: Basic circuit review (1.2.3 and 1.2.4) and completion of Solar Hydrogen Car with Vex motor (1.3.1), Project 1.3.4 Heat Box Lab Renewable Insulation with Graphical Analysis, and materials to build a compound machine 1.1.6.
Morning Schedule
Afternoon Schedule
Google Drive Sharing
Automated Guide Vehicle 3.1.7
Elevator 3.1.7
Surgical Arm 3.1.7
Cookie Topper 3.1.7
“Marble Sorter” 3.3.1
Marble Sorter Pics
Vex V5 Teaching & Learning Progression
Vex Robotics Support- Vex Library
Vex V5 Tutorials –Nice Resource
Step 1: In 3.1.1 Introduction to the Vex Robotics Platform PPT i
Step 2: Motors and Sensors Setup
Sample Brain Screens for Step 2
Step 3: Program Outputs and Inputs �3.1.2 and 3.1.3 Procedures
Step 4: While Loops and If-Else Structures 3.1.4
Next Slides are more on Step 4
Activity 3.1.4�While Loops, If-Else Structures, & Variables
While and If-Else Example
Boolean Operators
Symbol (text based) | Symbol (V5) | Meaning |
== | | “Is equal to” |
!= | | “Is NOT equal to” |
> | | “Greater than” |
< | | “Less than” |
>= | N/A | “Greater than or equal to” |
<= | N/A | “Less than or equal to” |
Looping - While loops
Looping allows the program to repeat a sequence as long as certain conditions are met. Looping streamlines your program so you don’t have create the same code multiple times. It simplifies your code and makes it easier to read and more efficient.
While loops
While (boolean condition)
{
Body (code you want to repeat)
}
While loop considerations
While challenge (together)
Challenge 1
Challenge 2
Modify the code to allow this to repeat indefinitely
Other looping options
Boolean Condition
Commands
If Statements
Start
IF
no
yes
Do this
Do that
If-Else Statements
If/else-if/else Statements
-Occasionally you need more than 2 options
-1 of 3 (or more) scenario
Nesting
Nesting Considerations
Step 5: Variables and Functions 3.1.5
Next slides are more on Step 5: Variables and Functions �
Variables
abrv. | Type | Value |
int | Integer | 0,5,-10 |
float | Float | 0.5, 10.0 |
bool | Boolean | True,False |
string | String | “hello” |
Example uses:
Functions
void FunctionName(); - Declare the function
DataType FunctionName(parameters) - Define the function
{
body
}
FunctionName() - call the function
Function Declaration
Function Definition
Function Call
Function examples
Function Declaration
Function Definition
Function Call
Add an parameter
When to use functions…
Tips
1.2.3 Physical Circuits
Intro to Electricity and Breadboarding Located in 1.2.3
Links to Eric’s Help Videos
1.3.1 Solar Fuel Cell Car
1.3.1 Resources to Guide Your Work
1.3.1 Additional Challenge
1.3.4 Heat Box
1.3.4 Heat Box Resources
Heat Box and Thermodynamics Help Videos from Eric
1.1.6 Compound Machine
1.1.6 Resources
Help video on Compound Machine Analysis
Some more info/Course Eval/Website Reference