This assignment will be getting you familiar with Swift coding using an app called Swift Playgrounds. You will complete the lessons in the app and then have the opportunity to choose a robot to code and complete a task to demonstrate your understanding of the concepts.
Objective: Students will be able to code a robot of their choice using swift code on the Swift Playgrounds app that demonstrates their understanding of
sequence - the order in which the commands are given
bugs - errors in your code
debugging - to find and fix errors in code that prevent an application from running correctly
commands - specific action for a computer program
defining functions - creating a function; a function is a group of commands given a name. This set of commands can be run with just the name given to the function whenever the set is needed
calling functions - telling a program to run a function in the code
and
for loops - runs a block of code over and over for a set amount of times.
Students will also be able to describe how they used these elements in their code and the process they took to complete the assignment.
2. Individually on your own Ipad but also working with your partner if you have one, complete the entire Commands section. When finished with all lessons, show them to me. Make sure you are reading each lesson well. If they are not completed correctly, you will have to re-do them.
3. I will give you a mini lessons on functions. Do not start the function section unless we have talked about what they are.
4. Individually on your own Ipad but also working with your partner if you have one, complete the entire Functions section. When finished with all lessons, show them to me. You need to create functions for all lessons or I will make you redo them. Finished? Move to #5.
5. I will give you some brief instruction on for loops. Individually on your own Ipad but also working with your partner if you have one, complete the entire Loops section. When finished with all lessons, show them to me. You need to create for loops (and functions sometimes) for all lessons or I will make you redo them. STOP AT CONDITIONAL CODE. Finished? Move to #6.
6. You and your partner if you have one need to choose a robot to use to complete this assignment. Remember, you can only choose each robot one time during the rotation. We can only have a certain amount of robots being used at a time so the robot you want to use may not be available. Let the teacher know what robot you will be using. Have your robot chosen and have told the teacher? Move to #7.
7. Once your group has decided on the robot you want to use, complete the robot specific Swift Playgrounds lessons on ONE Ipad only. You will need to see me for instructions on how to download the lessons you need. You will need to connect to the robot via bluetooth and connecting with multiple Ipads is not possible. When finished with the lessons mentioned on the links below, show me.
Click on the links below for robot specific help and instructions on the lessons you need to complete before starting the assignment.
We are using a Lego Mindstorms
Finished? Move to #8.
8. Complete Assignment 2.
You and your group are tasked with coding your robot to demonstrate your understanding of commands, functions and loops. You have free reign as to what robot you want to use (you are only allowed to use each type of robot one time during the rotation) and what you want your robot to do for this assignment, but you need to have at least 1 loop and 1 function. You need to include more if you choose to go for a 4 or 5. Remember, to go for a 4 you need multiple examples of the concepts and the code also needs to be the shortest code possible. For a 5 you must include the requirements for the 4 but also need to construct something that your robot uses in the code you write. If you and your group want to go for the 5, please conference with the teacher so you are able to obtain the building materials you will need.
If you are using the Lego Mindstorms, Dash or Sphero, you need to make a maze and use items in your maze that you place / build. If you are using a Drone, you need to make something your drone takes off on and lands on and / or something it flies through. If you are using the Meebot, you need to construct something the robot uses in his dance.
Once you have completed your code, create the Google Slides presentation that was sent to you in your Google Drive (you may have to share it with your partner) and include slides that have the following things:
Slide 1: Name and title of assignment
Slide 2: A screenshot of your code
Slide 3: An explanation of how you created the code, how you sequenced, used functions and loops and how you debugged your code. You must include the following vocabulary somewhere in this slide: Sequence, Bug, Debug, Command, Define a Function, Call a Function, and For Loop. To get a 3 you need to include all of these words in your explanation. If you want to go for a 4, you need to define them as well as include them and explain how they are related to what you did. To go for a 5, you are taking on the role of a teacher and making it so anyone reading your paragraph would be able to reproduce what you did in your coding and completely understand the process.
Slide 4: A video of your robot completing your code.
Slide 5: Reflection - What obstacles did you face during this assignment? How did you persevere?
Click HERE to see the rubrics that you are graded on.