## Robotics to FIS Career Fair

Today, I had the honor of taking several of my FTC 11242 team members to Ferris Intermediate School for its inaugural Career Fair! We were offered to chance to come over and present about careers in robotics and automation.

Part of our discussion centered around working on a team and interpersonal skills. I presented it to the 4th graders that we were working with in the context of playing soccer on the playground at recess. I also had a few team members speak to the challenges that were faced, but held it at an age-appropriate level.

Afterward, our discussion moved to careers in robotics and automation. We first looked at Amazon and the use of the Kiva Robotics systems in order fulfillment. We discussed how the old system was setup and how that compared to the new system and the jobs that is created.

Our last discussion was centered around the NASA Curiosity Mars Exploration Rover. We discussed the problem presented in the NatGeo clip. In the presentation, I setup what was going on, but then had the participants sit in groups with the team members and work through brainstorming ideas for how the rover could traverse the rocks that were damaging the rover. The groups were given only 4 minutes to brainstorm.

When their time was up, we came back together and quickly presented the ideas. I then discussed with them that what they had just done was a brainstorming session – the same type of thing that NASA did when they discovered the problem.

In both of our presentations, we had 2 groups whose faces lit-up when they saw that the solution NASA ultimately used was the one they had come up with in the brainstorming session!

## Basic Variables in Python

Today, we have been playing with basic variables in Python. The plan is to output something similar to the following:

```Hello World
1 + 1 = 2
2 + 2 = 4
4 + 4 = 8```

This output is to be generated entirely from calling variables.

```#Programmer Name: Eric Evans, M.Ed.
#Program Name: 02 - Hello Variable
#Program Description: Outputs assigned information using only variables.
#
#DECLARATION OF VARIABLES
firstWord = "Hello"
secondWord = "World"
space = ' '
#OUTPUT
print(firstWord + space + secondWord)```

Now, as you can see, the first line of the output is somewhat easy to code. We declared the variables firstWord, secondWord, and space and then called them to print concatenated together.

```#Programmer Name: Eric Evans, M.Ed.
#Program Name: 02 - Hello Variable
#Program Description: Outputs assigned information using only variables.
#
#DECLARATION OF VARIABLES
firstWord = "Hello"
secondWord = "World"
space = ' '
#OUTPUT
print(firstWord + space + secondWord)
print(firstAddend + " + " + firstAddend + " = " + firstProblemSum)
print(secondAddend + " + " + secondAddend + " = " + secondProblemSum)
print(thirdAddend + " + " + thirdAddend + " = " + thirdProblemSum)```

Things start to act problematically when we try to produce the last 3 lines of output. When we run the application, we receive an error because we are attempting to mix string and integer variables on a combined output line.

To resolve this issue, we must typecast the integers as strings.

```#Programmer Name: Eric Evans, M.Ed.
#Program Name: 02 - Hello Variable
#Program Description: Outputs assigned information using only variables.
#
#DECLARATION OF VARIABLES
firstWord = "Hello"
secondWord = "World"
space = ' '
#CASTING OF VARIABLES
firstProblemSum = str(firstProblemSum)
secondProblemSum = str(secondProblemSum)
thirdProblemSum = str(thirdProblemSum)
#OUTPUT
print(firstWord + space + secondWord)
print(firstAddend + " + " + firstAddend + " = " + firstProblemSum)
print(secondAddend + " + " + secondAddend + " = " + secondProblemSum)
print(thirdAddend + " + " + thirdAddend + " = " + thirdProblemSum)```

As you can see, on lines 15 – 21 we cast each of the integer variables as a string variable. At this point, lines 24 – 26 will execute as expected.

The compilable code can be viewed at https://repl.it/HesM/3

## Boolean Truth Tables

In my Computer Science class, we are revisiting Boolean operators and are looking more in-depth at Boolean Truth Tables.

In this post, I will look at the Boolean operators of AND, OR, NAND, NOR, and XOR.

For clarification, the following are considered equal and will be used in the post:

a AND b > c is equal to a . b > c

a NAND b > c is equal to a . b > c

a OR b > c is equal to a + b > c

a NOR b > c is equal to a + b > c

a XOR b > c is equal to a ⊕ b > c

For additional clarification, here are the logic gate representations of each of the objects that are presented:

So, let’s build our truth tables for each of the above named scenarios:

##### a . b > c
 A B Result TRUE TRUE TRUE TRUE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE

In this scenario, let’s say that a = 10, b = 5, and c = 7. In this case, the statement A > C is TRUE. However, the statement B > C is FALSE. If we look at the truth table above, the result is that the entire statement is now FALSE.

For an AND statement to be TRUE, all parts of the statement must be TRUE.

##### a + b > c
 A B Result TRUE TRUE TRUE TRUE FALSE TRUE FALSE TRUE TRUE FALSE FALSE FALSE

In this scenario, let’s say that a = 10, b = 5, and c = 7. In this case, the statement A > C is TRUE. However, the statement B > C is FALSE. If we look at the truth table above, the result is that the entire statement is now TRUE.

For an OR statement to be TRUE, at least one part up to all parts of the statement must be TRUE.

##### a . b > c
 A B Result TRUE TRUE FALSE TRUE FALSE TRUE FALSE TRUE TRUE FALSE FALSE TRUE

In this scenario, let’s say that a = 10, b = 5, and c = 7. In this case, the statement A > C is TRUE. However, the statement B > C is FALSE. If we look at the truth table above, the result is that the entire statement is now TRUE.

For a NAND statement to be TRUE, at least one part up to all parts of the statement must be FALSE.

##### a + b > c
 A B Result TRUE TRUE FALSE TRUE FALSE FALSE FALSE TRUE FALSE FALSE FALSE TRUE

In this scenario, let’s say that a = 10, b = 5, and c = 7. In this case, the statement A > C is TRUE. However, the statement B > C is FALSE. If we look at the truth table above, the result is that the entire statement is now FALSE.

For a NOR statement to be TRUE, all parts of the statement must be FALSE.

##### a ⊕ b > c
 A B Result TRUE TRUE FALSE TRUE FALSE TRUE FALSE TRUE TRUE FALSE FALSE FALSE

In this scenario, let’s say that a = 10, b = 5, and c = 7. In this case, the statement A > C is TRUE. However, the statement B > C is FALSE. If we look at the truth table above, the result is that the entire statement is now TRUE.

For a XOR statement to be TRUE, at least one condition in the statement must be TRUE. However, if all conditions in the statement are TRUE, then the result is FALSE.

## Launch Angle, Velocity, Range, and Height

In my Principles of Technology class, we are preparing for a water balloon launching project. Teams have to build a rig to launch a water balloon at a target.

The targets are placed at fixed intervals of 20 yards, 40 yards, and 50 yards from the launchers. At each target site will be either a school administrator or myself.

Before launching, each team must present their mathematical proofs of concept of how they ensure they hit their target(s).

Leading up to several days of building, we are taking a test over these calculations.

Launch Angle Calculator

Launch Angle Exam Review Guide

Launch Angle Exam Review Guide Answers

As several of my students have not yet covered Trigonometric mathematics, I have provided a quick “plug-and-chug” worksheet in Excel that solves for the missing equations.

It will solve for the following:

• H when given Vo and Theta
• =((((B2)^2)*((SIN(B4))^2)))/(2*B5)
• R when given Vo and Theta
• =((((C2)^2)*((SIN(2*C4)))))/(B5)
• Vo when given H and Theta
• =SQRT((D6*(2*D5))/((SIN(D4))^2))
• Vo when given R and Theta
• =SQRT((E7*E5)/(SIN(2*E4)))
• Theta when given Vo and H
• =ASIN(SQRT((F6*(2*F5))/((F2)^2)))
• Theta when given Vo and R
• =ASIN((G7*G5)/((G2)^2))/2

## 2-Dimensional Arrays in Java

Today, we started to cover 2-dimensional arrays in Java. I decided to start with something very easy:

We have an array with 2 rows and 3 columns. Like all things in Java, we start counting our indices at 0.

As such, the value of [0][0] is Vanilla and [1][0] is Ice Cream. Note that the first number in the reference points to the row and the second number in the reference points to the column.

```import java.util.*;
public class TwoDArrays {
public static void main(String[] args){
String[][] myBigArray = new String [][] {
{"Vanilla ", "Chocolate ", "Strawberry "},
{"Ice Cream", "Cookie", "Candy"}
};
System.out.println(myBigArray[0][0] + myBigArray[1][0]);
System.out.println(myBigArray[0][1] + myBigArray[1][0]);
System.out.println(myBigArray[0][2] + myBigArray[1][0]);

System.out.println(myBigArray[0][0] + myBigArray[1][1]);
System.out.println(myBigArray[0][1] + myBigArray[1][1]);
System.out.println(myBigArray[0][2] + myBigArray[1][1]);

System.out.println(myBigArray[0][0] + myBigArray[1][2]);
System.out.println(myBigArray[0][1] + myBigArray[1][2]);
System.out.println(myBigArray[0][2] + myBigArray[1][2]);
}
}```

Line 4 is where we created the 2-dimensional array named “myBigArray”.

Lines 5 and 6 are where we populated the array. Note that line 5 is the first row and line 6 is the second row.

Lines 8 through 18 are where we are outputting text that is “fed” by the 2-D array.

Line 8 concatenates [0][0] with [1][0] which is Vanilla and Ice Cream.

Line 9 concatenates [0][1] with [1][0] which is Chocolate and Ice Cream.

Line 10 concatenates [0][2] with [1][0] which is Strawberry and Ice Cream.

Line 12 concatenates [0][0] with [1][1] which is Vanilla and Cookie.

Line 13 concatenates [0][1] with [1][1] which is Chocolate and Cookie.

Line 14 concatenates [0][2] with [1][1] which is Strawberry and Cookie.

Line 16 concatenates [0][0] with [1][2] which is Vanilla and Candy.

Line 17 concatenates [0][1] with [1][2] which is Chocolate and Candy.

Line 18 concatenates [0][2] with [1][2] which is Strawberry and Candy.

## FTC Kick-Off Event Planning

Each year, FIRST Tech Challenge reveals the game for the new season on either the first of the second Saturday of September. This past year, the kick-off event was held on Saturday, 10-September-2017.

This year, our region held a kick-off event at University of Texas at Dallas in Hoblitzelle Hall in Cecil Auditorium. That lecture hall is able to accommodate a few hundred, but was at capacity. Some teams had to be turned away to ahead-of-time to other events that had to be organized to handle overflow.

For the 2017-2018 kick-off event, Ferris High School will be opening its doors to host teams from across the North Texas region!

The plan would be to house teams, three covered game floors, and the emcee in the main gymnasium during the kick-off event.

Depending on how many teams attend, we may also have 3 additional game floors in the auxiliary gymnasium.

When we have hosted FTC events in the 2016/2017 year, the main gymnasium was where the single game floor was placed and spectators were seated in the stands. The auxiliary gymnasium was used for the team pit areas and practice floor(s).

## Panorama Fun

Had some extra time in my computer lab today to clean and put some materials on the walls finally. Also gave me an excuse to play with the panoramic camera apps I have on my phone. 😜

## Projectile Motion Worksheet #2

My Principles of Technology class is continuing to work on the preparations for the projectile motion project of launching a water balloon at me from 40 yards away.

Today, we analyzed how to calculate the maximum height and maximum range of a projectile.

I first showed them the formulas and we pulled apart the variables:

We then discussed that the mass of the object does appear as any of the variables. We discussed why this is and then watched the following video:

Afterward, we started to work on the problems in the following online worksheet.

Projectile Motion Worksheet

The first 5 questions are short answer and will vary by student. The answers to the last 15 questions are provided at the link below:

Projectile Motion Worksheet Solutions

Up next, we will analyze drag coefficients and the impact of air/wind resistance on the flight path of the balloon.

We’ll then move into designing a launch apparatus that can launch the projectile at the correct angle and velocity.

Finally, we’ll move to testing. Fortunately, for this project, no fires!

## Flipping Stacks

We are now going to look at how to flip a stack. As was discussed previously, a stack is an ideal method for holding items in a queue such as an incoming call center.

Let’s say the following calls come into a call center. They are time-stamped for reference.

Call 5 – (469)382-1285 – 2017-02-13 / 08:02:57
Call 4 – (682)552-3948 – 2017-02-13 / 08:02:45
Call 3 – (214)233-0495 – 2017-02-13 / 08:01:55
Call 2 – (817)927-3849 – 2017-02-13 / 08:01:22
Call 1 – (972)828-1847 – 2017-02-13 / 08:01:13

In this case, the call that has been placed on hold the longest is “Call 1”, which came in at 8:01:13. However, recall that in a stack I can only interact with the item on the TOP of the stack. In this case, that is “Call 5”.

So, we are going to create a system that “flips” this stack over, pulls the new top item off and then returns to stack to its original order so additional calls can go in the place they should.

So, assuming that we have a stack already created for the numbers, we will need to create an empty temporary stack to hold the items. As we move the items over, the temporary stack will look like the following:

Call 1 – (972)828-1847 – 2017-02-13 / 08:01:13
Call 2 – (817)927-3849 – 2017-02-13 / 08:01:22
Call 3 – (214)233-0495 – 2017-02-13 / 08:01:55
Call 4 – (682)552-3948 – 2017-02-13 / 08:02:45
Call 5 – (469)382-1285 – 2017-02-13 / 08:02:57

As you can now see, “Call 1” is at the top of the stack and could be routed to the next available individual. However, if another new call were to come in, the stack would look like the following:

Call 6 – (512)231-1933 – 2017-02-13 / 08:03:19
Call 2 – (817)927-3849 – 2017-02-13 / 08:01:22
Call 3 – (214)233-0495 – 2017-02-13 / 08:01:55
Call 4 – (682)552-3948 – 2017-02-13 / 08:02:45
Call 5 – (469)382-1285 – 2017-02-13 / 08:02:57

To avoid our call queue getting mixed-up, immediately following the retrieval of the top item on the stack, we need to move the items from the temporary stack back to the original stack as follows:

Call 5 – (469)382-1285 – 2017-02-13 / 08:02:57
Call 4 – (682)552-3948 – 2017-02-13 / 08:02:45
Call 3 – (214)233-0495 – 2017-02-13 / 08:01:55
Call 2 – (817)927-3849 – 2017-02-13 / 08:01:22

Now, when “Call 6” comes in, it will go where it is supposed to go (following “Call 5”).

Let’s analyze the code for this problem.

```//Program Name: Flipped Stacks
//Programmer Name: Eric Evans, M.Ed.
//Programmer Organization: Ferris High School
//Program Date: Spring 2017
import java.util.*;
public class flippedstacks {
public static void main(String args[]){
int count, myStackSize, myTempStackSize;
Stack myStack = new Stack();
for (count = 1; count <=10; count++){
myStack.push(count);
}
myStackSize = myStack.size();
Stack myTempStack = new Stack();
for (count = 1; count <=myStackSize; count++){
myTempStack.push(myStack.pop());
}
System.out.println("Current Caller is " + myTempStack.pop());
myTempStackSize = myTempStack.size();
for (count = 1; count <=myTempStackSize; count++){
myStack.push(myTempStack.pop());
}
}
}```

Lines 1 – 4 are the general header information. Lines 5 – 7 are the imports and creation of the class and main object.

Line 8 creates 3 uninitialized integer variables: count, myStackSize, and myTempStackSize.

Line 9 creates a new empty stack named “myStack”.

Lines 10 – 12 push content into the “myStack” stack. It pushes numbers 1, 2, 3, 4, 5, 6, 7, 8, 9, & 10 into the stack.

Line 13 initializes the value of the myStackSize variable as the size of “myStack” using the size function of stacks.

Line 14 is like line 9, but it creates an empty stack named “myTempStack”. This will be the stack that temporarily holds our stack of information so we can get the first record.

Lines 15 – 17 push the content into the “myTempStack” stack by popping each record in the “myStack” stack. The for loop know how many times to do this by using the myStackSize variable that was declared on line 8 and initialized on line 13.

Line 18 displays which caller is the current caller by popping it from the top of the “myTempStack” stack.

Line 19 is like line 13 in that it initializes the value of the myTempStackSize variable as the size of “myTempStack” using the size function of stacks.

Line 19 is also the beginning of the process of reverting the stack back to its original order with the first (oldest) entry removed.

Lines 20 – 22 are similar to lines 15 – 17 but the reverse process. They push content into the “myStack” stack by popping each record in the “myTempStack” stack. The for loop knows how many times to do this by using the myTempStackSize variable that was declared on line 8 and initialized on line 19.

Line 24 & 25 close out lines 7 & 6 respectively.