<<

FIRST® at Home Programming with Romi Project Essentials

SUMMARY

Students will explore declarative programing using the WPI Library software. They will build a chassis using the Romi Robot and make their machines interact with its environment and perform tasks autonomously. This activity series builds programming skills and knowledge related to performing in a role as a programmer role on a FIRST® Competition team. Students completing these activities should have some knowledge and experience with programming or coding. If you are just starting out programming look at the other coding and programming skill building activities on FIRST at Home.

Age Range & Grade Level: Ages 13 +, Grade 8+ Program Connection: FIRST Robotics Competition ® Authored By: Lori Birch, Curriculum Developer, FIRST Education

OUTCOMES

1. Identify the problem and brainstorm solutions using a mobile robot and programming. 2. Decompose the technical documents of the Romi robot system. 3. Create a simple program using the WPILibrary and command-based programming design. 4. Using data from your robot, create a subsystem that improves the functionality of the machine. 5. Iterate your code to create the optimal solution for your robot game, finalize game criteria and present your game.

RELEVANCE MATRIX – Subject Area Crosswalks and Core Values Addressed

Science Math Literacy Social Studies Computer Science Motion, Forces, Measurement, Research, Content Career Declarative Physics, Mechanics 2D/3D modeling, Reading, Technical Connections, Programming, Geometry, Spatial Documentation Engineering for Pseudo Code, Reasoning Reading and social solutions Computational Comprehension Thinking Discovery Innovation Impact Inclusion Teamwork

FUN! Our last Core Value should always be used when doing any FIRST activity. KEY VOCABULARY Programming Teleoperated Autonomous Pseudo Code Algorithms Sensors Prototyping Design

MATERIALS & SUPPLIES NEEDED FOR THIS ACTIVITY

Per : Romi Robot Kit for FIRST, Raspberry Pi, Six AA batteries, Computer/Laptop, Internet Connection, Optional (For Go Further Activities) Proximity sensors and range finders

Per Class or Team: Tape, Soda Cans or Water Bottles, assorted materials cardboard, etc.

ACTIVITY TEACHING TIPS The FIRST activity series blends the learning of core concepts and practical application through project- based learning. The activity series involves students exploring concepts using the steps pictured below. This process creates authentic learning opportunities for students as they complete the activities. As the facilitator put the responsibility for learning on the students using the documents to support students and ask questions for them to deepen their learning.

SCOPE AND SEQUENCE

Activity Name Length Activity Summary (hours)

Problem Explore Computational Thinking and Robotics using FIRST Core Identification and 5 - 10 Values to learn about the command-based programming design Design pattern. Decompose the Romi robot, comparing with real-world . Decomposition 5 - 10 Build the chassis of the Romi robot using the technical documentation. Practice pseudo coding learn the programming environment and Programming 5 - 10 syntax used in the WPILibrary.

Create new command-based actions for the robot and test Functionality and 5 - 10 commands using increased functions for being able to interact Subsystems with the game environment. Test your final solutions and optimized programming. Present a Iteration and 5 - 10 demonstration that shows the logic, game rules and strategy for Demonstration your robot using your game field criteria. Total hours are based on estimated time to complete for the base activity as written, extended hours reflect addon activities shown 25 - 50 in the Go Further Section of each lesson. These may need additional materials to complete. EVIDENCE OF ACHIEVEMENT

Evaluation Rubric

Category 3 points 2 points 1 point

Some of the requirements All requirements on the Only a few requirements on Requirements on the design brief were design brief were met. the design brief were met. met. Clearly showed how the solution Showed how the solution Not clear how the solution Design would help others. would help others. would help others.

Demonstrated collaboration by sharing information Shared some information or Respect and inclusion being Collaboration or working with team with team members. developed. members. All the questions are All the questions are The questions are not Knowledge Gained answered but could have answered completely. answered. more detail.

FIRST is a global robotics community that prepares young people for the future. www.firstinspires.org FIRST® at Home Programming with Romi Robot Problem Identification and Design

ACTIVITY 1 – Problem Identification and Design PROBLEM STATEMENT

Programming in the FIRST Robotics Challenge environment uses the WPILib software package. This is a portion of the system and includes a variety of libraries and tools. This programming library can support a variety of programming languages: Java, C++ and LabVIEW. In this activity you will begin to use basic algorithms and robot logic.

In this scenario, as future innovators and problem solvers, that want to make an impact in the community, you are tasked designing a robot game that can be played using the Romi robot and WPILib contraints. CRITERIA & CONSTRAINTS • The game can be played with a single player or two players. • Your plan should include how to demonstrate FIRST® Core Values. • The robot used will be the Romi robot. • There should be an autonomous and/or teleoperated driver-controlled period. • Develop a decision matrix that will determine the tradeoffs you will need to make in determining the robot design based on the Romi robot. • Make a plan using pseudo code that uses a command based format.

ENGINEERING DESIGN PROCESS & FIRST CORE VALUES

FIRST Engineering Design Process | Explore FIRST Core Values

INTRODUCING ROMI ROBOT Watch the FIRST Hour of Code episode clip & explore the documentation for the Romi robot.

Command-based programming is method to organize a robot code or algorithm. This is known as declarative programming and the algorithm is made up of commands for the robot to execute. To execute a command you must first define the desired robot behavior.

Now that you have reviewed the Romi documentation think about your game design create some basic commands using pseudo code to define basic robot behaviors. Determine tradeoffs of your robot design to meet the game design. GAME DESIGN • What makes a good game? • What materials do you have available to create a game? • Will you be creating the game as an individual or can multiple people participate in your game? • How will the game tasks take into account the restrictions of the Romi robot?

GAME FIELD EXAMPLE Below is an example diagram of basic layout of a game field. Use the space below to design your own field set up. Determine what materials you need for the field and what is avalible for you to use.

BRAINSTORM IDEAS FOR YOUR GAME DESIGN AND PROTOTYPE

Brainstorm 2 or 3 examples of optimal robot play in the space below. Use a sketch or diagram as needed.

REFLECTION QUESTIONS 1. How can data gathered by sensors lead to algorithms for robots to make decisions? 2. How does the design of a game affect the design of a robot? 3. What specific features of command-based program make it useful for programming robots? 4. What programming language will you use to program your Romi robot?

GOING FURTHER (OPTIONAL- SEE MATERIALS NEEDED) Incorporate sensors on to your robot. Explore the sensors in the optional accessories for the Romi to see the options that are integrated into the WPIlib. • How is data gathered in an environment with sensors? • What sensors are available? • What data does the sensors measure to be used to make decisions? CORE VALUES SELF-REFLECTION

Amazing Skill Great Job Making Progress Could Be Better

I approached the tasks I approached the tasks looking for all possible and asked questions I approached tasks I depended on others to answers independently from one other person but needed assistance Discover make the discovery for and used perseverance but persevered to multiple times to reach a me. to discover the answer discover the answer on point of discovery. on my own. my own. I struggled with being I used creativity and I used creativity and creative and only used perseverance to solve perseverance to solve I used creativity the information given problems on my own, problems on my own but struggled with Innovation and needed a lot of coming up with unique coming up with different perseverance to solve encouragement from solutions for the tasks I solutions for the tasks I problems on my own. others to complete the was given. was given. task. I approached the tasks applying understanding I approached the tasks I understand the tasks I understand the tasks of the information with knowing and applying but struggle to apply but did not approach it Impact the impact it can have the information with how it will help me in with understanding the on me and my future as impact it can have on my future or to influence impact it can have on well as how I could help me and my future. others. my future or others. others. I approached all I approached most I did not approach tasks with inclusion of I approached some with inclusion of tasks with inclusion of others’ ideas, I showed tasks with inclusion of others’ ideas, I tried others’ ideas, I tried tremendous kindness others’ ideas, I tried to understand others’ to understand others’ by including others’ to understand others’ Inclusion views and include them views and include them views in my projects and views and include them in my projects and work. in my projects and work. I approached my in my projects and work. My solution mostly work. My solution is not solution thinking how all My solution meets only incorporates needs of inclusive of different people would interact a few needs of others. others. types of people. with the solution. I only sometimes I used collaboration, I used collaboration, I used collaboration, used collaboration, communication and communication and communication and communication and project management project management project management Teamwork project management to get all tasks to get most tasks to get some tasks and accomplished a few accomplished for myself accomplished for myself accomplished for myself tasks for myself as well as well as the others. as well as the others. as well as the others. as the others. I kept a positive attitude throughout and found I kept a positive attitude I saw the enjoyment I only saw struggle in opportunities to have throughout and found and fun after the activity completing my tasks Fun fun even through opportunities to have but struggled to see it and did not look for struggle. I looked for fun even through during. times to have fun. additional opportunities struggle. to have fun in my tasks.

FIRST is a global robotics community that prepares young people for the future. www.firstinspires.org FIRST® at Home Programming with Romi Robot Decomposition

ACTIVITY 2 – Programming PROBLEM STATEMENT Decomposition involves breaking down a complex problem or system into smaller parts that are more manageable and easier to understand. The smaller parts can then be examined and solved, or designed individually, as they are simpler to work with. You first must become knowledgeable about the robot components, how to safely build it the robot and how its design can be used to solve problems. You will develop your skills in understanding the parts of the robot, how they are designed and how data is processed in each component. In the next step of your journey you will need to create an illustration to demonstrate the patterns that exist between the Romi robot and other robotic machines. Comparisions can come from various machines you might find in society have the same patterns of execution. The illustration should include the following criteria and constraints.

CRITERIA & CONSTRAINTS • Compare and contrast hardware and data processing of a real world robot and the Romi robot. • Compare and contrast mechanical functionality of a real world robot and a Romi robot. • Explain how other devices in society that use the same patterns including those that are interconnected with other machines. • Include how understanding patterns in one device can help you solve the same patterns in new devices. • Create an illlustration that can be used to present the patterns in devices to others, to prepare for your final presentation.

ENGINEERING DESIGN PROCESS & FIRST® CORE VALUES

FIRST Engineering Design Process | Explore FIRST Core Values |

DECOMPOSE THE ROMI Watch the Computational Thinking video

• Explore the parts that come in the Romi robot kit, look at the parts and record any details that you find interesting o The chassis kit o The control module o Raspberry Pi • Explore the documentation for assembling the Romi Robot and decompose the individual elements of the robot system. To better understand the documentation, use the following strategies to help you decompose the material: • Highlight key words and words that you might not know. For each word consider what does it do, how does it relate to the robot performance (is it mechanical or electrical), if electrical what type of data is involved in the input and output of its function. • Look for images, that can give you more specific information or data that may need to be considered in the algorithm.

Components Types What does it do? Notes: What do you (Mechanical/Electrical) need to know more about? Chassis documentation Differential Drive

Extended Backshaft

Quadrature encoders

Reflection Questions:

How is the chassis designed to support all of the components and potentially others that you might want to add to fit your game and game strategy?

How could you use 3-D Printing to add structure and functions with manipulators?

Components Types What does it do? Notes: What do you (Mechanical/Electrical) need to know more about? Control Module documentation SPI Communication UART I2C Communication

Reflection Questions:

How is binary code used in different types of electronic communication

Why is it important to understand SPI and UART if you are using I2C Communication?

How could knowing the recommended operating conditions help you understand the data that is being processed and what data you might need to send to the motors? Components Types What does it do? Notes: What do you (Mechanical/Electrical) need to know more about? Raspberry Pi documentation Raspberry Pi

Reflection Questions:

What is a WebSocket?

How is the WebSocket utilized in a Raspberry PI to establish a connection that is similar to Internet of Things devices? DECOMPOSE A REAL WORLD ROBOT

Choose a real world robot as a comparison for the Romi.

Look for patterns in the design of the Romi robot that are similar to a real world robot, consider using a FIRST® Robotics Competition robot if you have one.

• Where is power distributed? • How is data transferred? • How does data and power achieve mechanical functions?

BRAINSTORMING Brainstorm ideas of where similarities exist between the two robots, specifically their various systems and how you might create an illustration that demonstrates these similarities. DEVELOP PROTOTYPE AND SUPPORTING MATERIAL

Follow the directions here to assemble your Romi robot. *Note your kits do not require soldering. Document your process to include in your final illustration.

REFLECTION QUESTIONS 1. How can data gathered by sensors lead to algorithms for robots to make decisions? 2. How can understanding patterns in data collected from similar devices help you improve your computational thinking skills. 3. What similarities were surprising between your Romi robot components and real world robots?

GOING FURTHER (OPTIONAL- SEE MATERIALS NEEDED) Decompose the sensors and actuators that are available for the Romi. Add the sensors and actuators to your illustration and comparison to a real world robot. • Sensors and Actuators o Sharp Distance Sensor o Reflectance Sensor o Actuators CORE VALUES SELF-REFLECTION

Amazing Skill Great Job Making Progress Could Be Better

I approached the tasks I approached the tasks looking for all possible and asked questions I approached tasks I depended on others to answers independently from one other person but needed assistance Discover make the discovery for and used perseverance but persevered to multiple times to reach a me. to discover the answer discover the answer on point of discovery. on my own. my own. I struggled with being I used creativity and I used creativity and creative and only used perseverance to solve perseverance to solve I used creativity the information given problems on my own, problems on my own but struggled with Innovation and needed a lot of coming up with unique coming up with different perseverance to solve encouragement from solutions for the tasks I solutions for the tasks I problems on my own. others to complete the was given. was given. task. I approached the tasks applying understanding I approached the tasks I understand the tasks I understand the tasks of the information with knowing and applying but struggle to apply but did not approach it Impact the impact it can have the information with how it will help me in with understanding the on me and my future as impact it can have on my future or to influence impact it can have on well as how I could help me and my future. others. my future or others. others. I approached all I approached most I did not approach tasks with inclusion of I approached some with inclusion of tasks with inclusion of others’ ideas, I showed tasks with inclusion of others’ ideas, I tried others’ ideas, I tried tremendous kindness others’ ideas, I tried to understand others’ to understand others’ by including others’ to understand others’ Inclusion views and include them views and include them views in my projects and views and include them in my projects and work. in my projects and work. I approached my in my projects and work. My solution mostly work. My solution is not solution thinking how all My solution meets only incorporates needs of inclusive of different people would interact a few needs of others. others. types of people. with the solution. I only sometimes I used collaboration, I used collaboration, I used collaboration, used collaboration, communication and communication and communication and communication and project management project management project management Teamwork project management to get all tasks to get most tasks to get some tasks and accomplished a few accomplished for myself accomplished for myself accomplished for myself tasks for myself as well as well as the others. as well as the others. as well as the others. as the others. I kept a positive attitude throughout and found I kept a positive attitude I saw the enjoyment I only saw struggle in opportunities to have throughout and found and fun after the activity completing my tasks Fun fun even through opportunities to have but struggled to see it and did not look for struggle. I looked for fun even through during. times to have fun. additional opportunities struggle. to have fun in my tasks.

FIRST is a global robotics community that prepares young people for the future. www.firstinspires.org FIRST® at Home Programming with Romi Robot Programming

ACTIVITY 3 – Programming PROBLEM STATEMENT

Now that you have decomposed the hardware of the Romi robot you can use this information to get the Chassis moving. Just as you decomposed the hardware you will want to decompose the programming platform used to program the Romi. Use the templates provided to decompose the subsystem, commands and program infrastructure, Then modify the program to fit the desired method you plan to control your robot.

CRITERIA & CONSTRAINTS • Configure the WebSocket and Onboard IO of the Romi robot to run using an internal wireless network. • Create a pseudo code using a command-based design pattern. • Decompose and modify WPILibrary (WPILib) to use run a simple program. • Create a program that operates the Romi either with a joystick or driving autonomously.

ENGINEERING DESIGN PROCESS & FIRST® CORE VALUES

FIRST Engineering Design Process | Explore FIRST Core Values

BUILDING THE BACKGROUND & BRAINSTORMING Watch this video on the WPILibrary (WPILib) programming environment

Reflect on the video. • How is command based framework different than iterative programming? • How might you need to change your thinking about your programming processes?

Brainstorm the robot actions need to have the your robot achieve specific actions. • What hardware will each of the actions use? • How will that hardware be divided into subsystems? • What commands will be used each subsystem?

Subsystems and commands are two important part of programing using a command-based design. Read about subsystems, commands and running commands in the WPILib materials here. DEVELOP PSEUDOCODE FOR THE ROMI Write a basic drive forward program

PROGRAMMING THE ROMI  Before you start become familiar with the WPI Library.  Using a game station or controller - Install the Labview FRC Tools.  Install the 2021 Library and VS Studio Code.  Refer to the Romi Getting Started components in the WPILibrary  Image and test websocket configuration

• Programming the Romi . The Romi Reference template which uses a gamepad joystick (could be an Xbox controller) . Decompose the code that is in the Romi Project Example, RomiReferece, the Drivetrain class and determine if you will use a gamepad or program autonomously.

*Note that you can hover over class names to understand the expected hardware and data that is inherited with the class. You can see how to declare the classes, hardware and data that is needed for the subsystem. This includes channels on the hardware where the subsystem component is found, and the data that might be needed to run the subsystem hardware (encoder values, speed, diameters and any other needed inherited classes and methods needed for the classes :

Note that the data that is declared is specific to the hardware that you previously researched.

The kCountsPerRevolution =1440 is relevant to the pulses generated by the encoder.

This is found in the Pololu documentation.

Note that the kWheelDiameterInches establishes the wheel diameter of the Romi.

So the distance traveling is calculated by:

Wheel diameter x (encoder count/counts per revolution) =

Distance the robot is traveling

In addition to establishing the hardware where it is found and the data needed you also need to include how the subsystem will be controlled. For instance here you use the Differential Drivetrain class to create new differential drive using left and right motors. : Hovering over the class can give you details of what to you might need and how you might utilize other classes such as arcade drive to further develop methods in the class.

Optional - Connect a joystick to your computer. Modify the joystick - the joystick declarations can be found it the robot container class.

Run the robot using the simulation tools and robot drivers station.

Create a drive forward command to run the command autonomously if you are not using a joystick.

Download the zip file and then open as a project in the Wpilib, be sure to chose the correct operating system folder.

TEST AND MODIFY YOUR CODE

REFLECTION QUESTIONS 1. How did your code in the WPILib differ from your pseudo code? 2. How can increasing the amount of defined commands allow you to achieve more in a robot? 3. How might your coding knowledge impact the potential successful completion of your planned game? CORE VALUES SELF-REFLECTION

Amazing Skill Great Job Making Progress Could Be Better

I approached the tasks I approached the tasks looking for all possible and asked questions I approached tasks I depended on others to answers independently from one other person but needed assistance Discover make the discovery for and used perseverance but persevered to multiple times to reach a me. to discover the answer discover the answer on point of discovery. on my own. my own. I struggled with being I used creativity and I used creativity and creative and only used perseverance to solve perseverance to solve I used creativity the information given problems on my own, problems on my own but struggled with Innovation and needed a lot of coming up with unique coming up with different perseverance to solve encouragement from solutions for the tasks I solutions for the tasks I problems on my own. others to complete the was given. was given. task. I approached the tasks applying understanding I approached the tasks I understand the tasks I understand the tasks of the information with knowing and applying but struggle to apply but did not approach it Impact the impact it can have the information with how it will help me in with understanding the on me and my future as impact it can have on my future or to influence impact it can have on well as how I could help me and my future. others. my future or others. others. I approached all I approached most I did not approach tasks with inclusion of I approached some with inclusion of tasks with inclusion of others’ ideas, I showed tasks with inclusion of others’ ideas, I tried others’ ideas, I tried tremendous kindness others’ ideas, I tried to understand others’ to understand others’ by including others’ to understand others’ Inclusion views and include them views and include them views in my projects and views and include them in my projects and work. in my projects and work. I approached my in my projects and work. My solution mostly work. My solution is not solution thinking how all My solution meets only incorporates needs of inclusive of different people would interact a few needs of others. others. types of people. with the solution. I only sometimes I used collaboration, I used collaboration, I used collaboration, used collaboration, communication and communication and communication and communication and project management project management project management Teamwork project management to get all tasks to get most tasks to get some tasks and accomplished a few accomplished for myself accomplished for myself accomplished for myself tasks for myself as well as well as the others. as well as the others. as well as the others. as the others. I kept a positive attitude throughout and found I kept a positive attitude I saw the enjoyment I only saw struggle in opportunities to have throughout and found and fun after the activity completing my tasks Fun fun even through opportunities to have but struggled to see it and did not look for struggle. I looked for fun even through during. times to have fun. additional opportunities struggle. to have fun in my tasks.

FIRST is a global robotics community that prepares young people for the future. www.firstinspires.org FIRST® at Home Programming with Romi Robot Functionality and Subsystems

ACTIVITY 4 – Functionality and Subsystems PROBLEM STATEMENT

Now that you have your Romi robot up and running it is time to add more functionality to your robot so that you can demonstrate the robot to others. Adding functionality will require you to advance your programming skills further. As you approach the development of your algorithms consider how you might explain to others the decisions that the robot is making.

CRITERIA & CONSTRAINTS • Use pseudocode to develop command-based action for your robot to achieve a specific game strategy. • Use at least three commands to meet your game strategy. • Add additional functionality of to your Romi using hardware such as manipulators, sensors or servos. • Use the Wpilib to create subsystems and declare the data that will be used in those subsystems.

ENGINEERING DESIGN PROCESS & FIRST® CORE VALUES

FIRST Engineering Design Process | Explore FIRST Core Values

BUILDING THE BACKGROUND & BRAINSTORMING

Refer to the robot game that you designed in lesson 1 consider the following: • What actions will the robot be performing? • What additional hardware will be needed to perform those actions? • What type of actions will the robot be performing with the hardware to achieve the actions? • How can those actions be defined into subsystems and commands?

Watch the hour of code episode on creating a chassis subsystem, command and command groups: • Consider how might you create a commands to achieve your game objective? • What other subsystems will you need to create? • What elements are available in the Wpilib to help you design and implement your code.

Explore information on how to configure the tools in the dashboard to allow you to collect data from your hardware and test it while it is running on the computer. Set up Shuffleboard and or Smart dashboard with your Romi. This will help you collect data on your hardware to improve and troubleshoot your algorithms. SUBSYSTEMS AND DATA

Explore the Wpilib to find out how to declare the hardware you will be using as well as the data it will need. Note that the sample code isn’t how to execute the command using the hardware only how to declare it in your subsystem. Consider that you may have more than one of the following components in a subsystem. For example, you may use a limit switch to measure when a mechanism is open so it would be in one subsystem. Or a distance sensor may be able to tell you when there is an opening in front of the robot versus a solid wall. Explore the following resources for the hardware you will be using:

Encoders

Encoders can add great control and functionality to you drive system. You can create several different control options using the tools in the WpILib. To be able to write programs that allow your robot to move throughout your game field you will want to use encoders, review topics in documentation including P loop and PID Control.

DEVELOP COMMANDS

Remember that you will have a checklist of what will occur in each command. Initialize, Execute, Interrupted and Finished. Data needed Algorithm or action to Output for be performed. Any subsystem additional variables to (time, data processing to position, achieve output. power) Command 1 Initialize

Execute

IsFinished

Command 2 Initialize

Execute

IsFinished

CREATE COMMANDS The example below is using a drive forward command, using a chassis subsystem - this is different from the drivetrain subsystem in the Romi template. Note: that the commands can have new data and methods created to execute it. Place this above the Initialize method and then call it in the method where needed. The example below creates a class to turn, it uses math to calculate the inches the wheel is turning to achieve a specific angle.

Also consider how you might combine command groups to create larger commands that achieve a function. TESTING COMMANDS Data needed for Algorithm or action Output subsystem (time, position, power) Command 1 Initialize Execute

IsFinished Command 2 Initialize Execute

IsFinished

REFLECTION QUESTIONS 1. How might you create the rest of the commands you might need to achieve competing in your game? 2. You may only be developing simple commands for driving with the Romi, how could these same commands transfer to a real world robot? GO FURTHER! Servos • If you are using servos see the documentation for the servo on how to create the servo in a subsystem. Note: you will also want to make sure to refer to the Pololu servo page to make sure that the data the servo needs matches the library configuration.

Distance Sensors • If you are using a distance sensor refer to your research you did in identifying patterns in the hardware. Note: that the Sharp distance sensor is an analog sensor you can find information on the Wpilib about programming analog sensors below. Review the information on the Pololu site on how it samples and returns data. See the links below on how to declare the hardware and how you might need to also consider oversampling and averaging of data to get accurate readings for your sensor. You also will need to make sure that you have configured the IO pins correctly.

• Limit Switches - Adding limit switches CORE VALUES SELF-REFLECTION

Amazing Skill Great Job Making Progress Could Be Better

I approached the tasks I approached the tasks looking for all possible and asked questions I approached tasks I depended on others to answers independently from one other person but needed assistance Discover make the discovery for and used perseverance but persevered to multiple times to reach a me. to discover the answer discover the answer on point of discovery. on my own. my own. I struggled with being I used creativity and I used creativity and creative and only used perseverance to solve perseverance to solve I used creativity the information given problems on my own, problems on my own but struggled with Innovation and needed a lot of coming up with unique coming up with different perseverance to solve encouragement from solutions for the tasks I solutions for the tasks I problems on my own. others to complete the was given. was given. task. I approached the tasks applying understanding I approached the tasks I understand the tasks I understand the tasks of the information with knowing and applying but struggle to apply but did not approach it Impact the impact it can have the information with how it will help me in with understanding the on me and my future as impact it can have on my future or to influence impact it can have on well as how I could help me and my future. others. my future or others. others. I approached all I approached most I did not approach tasks with inclusion of I approached some with inclusion of tasks with inclusion of others’ ideas, I showed tasks with inclusion of others’ ideas, I tried others’ ideas, I tried tremendous kindness others’ ideas, I tried to understand others’ to understand others’ by including others’ to understand others’ Inclusion views and include them views and include them views in my projects and views and include them in my projects and work. in my projects and work. I approached my in my projects and work. My solution mostly work. My solution is not solution thinking how all My solution meets only incorporates needs of inclusive of different people would interact a few needs of others. others. types of people. with the solution. I only sometimes I used collaboration, I used collaboration, I used collaboration, used collaboration, communication and communication and communication and communication and project management project management project management Teamwork project management to get all tasks to get most tasks to get some tasks and accomplished a few accomplished for myself accomplished for myself accomplished for myself tasks for myself as well as well as the others. as well as the others. as well as the others. as the others. I kept a positive attitude throughout and found I kept a positive attitude I saw the enjoyment I only saw struggle in opportunities to have throughout and found and fun after the activity completing my tasks Fun fun even through opportunities to have but struggled to see it and did not look for struggle. I looked for fun even through during. times to have fun. additional opportunities struggle. to have fun in my tasks.

FIRST is a global robotics community that prepares young people for the future. www.firstinspires.org FIRST® at Home Programming with Romi Robot Iteration and Demonstration

ACTIVITY 5 – Iteration and Demonstration PROBLEM STATEMENT

As you near the end of your project with a Romi robot, you now have the tools to make your robot perform basics tasks by running commands. But what is the optimal code to achieve your game strategy? What additional ways can you improve the performance of the robot Your task in this activity is to finalize these details and make your final presentation.

CRITERIA & CONSTRAINTS •Demonstrate how to program machines so that they can make decisions. • Use logic to improve algorithm flow and use sensors. • Model a successful run of your game using the code you developed. • If you have other people working with you create a mini competition using your game design.

ENGINEERING DESIGN PROCESS & FIRST® CORE VALUES

FIRST Engineering Design Process | Explore FIRST Core Values

BUILDING THE BACKGROUND & BRAINSTORMING

• Review the current programs and the sensors you are using. Note any algorithms you currently have developed using the command-based framework and tools from the Wpilib. • Consider how the command-based framework is developed with loops in different classes and how you develop the logic that goes within the loop framework. • Research how you might improve conditional statements to improve the logic of your program using Boolean logic. Watch the Crash Course video.

• Review your game and the game strategy for your ROMI robot from the previous activities. • Use the additional resources to improve the algorithms in your programs and improve your robot performance in the game. • Refer to your pseudocode in the previous lesson. How might you improve your pseudocode processing using Boolean logic. PLAN YOUR GAME STRATEGY LOGIC

Match your game strategy to the command logic in your improved pseudocode Algorithm or action to be performed. Data needed for Any additional Game Strategy subsystem (time, Output variables to data Logic position, power) processing to achieve output. Command 1 Initialize Execute

IsFinished

Command 2 Initialize Execute

IsFinished TEST AND RECORD

Determine additional testing and iteration to improve your game strategy.

PLAN YOUR PRESENTATION

Plan out your presentation ideas that demonstrates the logic and how your robot achieves its games strategy.

FINAL PRESENTATION • Develop and present your presentation to a test audience. • Improve your presentation based upon feedback. • Share your results. • Have a fun competition using your game design.

REFLECTION QUESTIONS 1. How could this project help inspire future generations to become pursue computer programming and the importance of it in their future? 2. How has this project helped you develop advanced programming skills? 3. How will these skills help you in a future career or to solve other problems you may encounter in the future? CORE VALUES SELF-REFLECTION

Amazing Skill Great Job Making Progress Could Be Better

I approached the tasks I approached the tasks looking for all possible and asked questions I approached tasks I depended on others to answers independently from one other person but needed assistance Discover make the discovery for and used perseverance but persevered to multiple times to reach a me. to discover the answer discover the answer on point of discovery. on my own. my own. I struggled with being I used creativity and I used creativity and creative and only used perseverance to solve perseverance to solve I used creativity the information given problems on my own, problems on my own but struggled with Innovation and needed a lot of coming up with unique coming up with different perseverance to solve encouragement from solutions for the tasks I solutions for the tasks I problems on my own. others to complete the was given. was given. task. I approached the tasks applying understanding I approached the tasks I understand the tasks I understand the tasks of the information with knowing and applying but struggle to apply but did not approach it Impact the impact it can have the information with how it will help me in with understanding the on me and my future as impact it can have on my future or to influence impact it can have on well as how I could help me and my future. others. my future or others. others. I approached all I approached most I did not approach tasks with inclusion of I approached some with inclusion of tasks with inclusion of others’ ideas, I showed tasks with inclusion of others’ ideas, I tried others’ ideas, I tried tremendous kindness others’ ideas, I tried to understand others’ to understand others’ by including others’ to understand others’ Inclusion views and include them views and include them views in my projects and views and include them in my projects and work. in my projects and work. I approached my in my projects and work. My solution mostly work. My solution is not solution thinking how all My solution meets only incorporates needs of inclusive of different people would interact a few needs of others. others. types of people. with the solution. I only sometimes I used collaboration, I used collaboration, I used collaboration, used collaboration, communication and communication and communication and communication and project management project management project management Teamwork project management to get all tasks to get most tasks to get some tasks and accomplished a few accomplished for myself accomplished for myself accomplished for myself tasks for myself as well as well as the others. as well as the others. as well as the others. as the others. I kept a positive attitude throughout and found I kept a positive attitude I saw the enjoyment I only saw struggle in opportunities to have throughout and found and fun after the activity completing my tasks Fun fun even through opportunities to have but struggled to see it and did not look for struggle. I looked for fun even through during. times to have fun. additional opportunities struggle. to have fun in my tasks.

FIRST is a global robotics community that prepares young people for the future. www.firstinspires.org