Robot Communication

This activity is extra and will not be graded. Although, it is pretty fun to program.

You will need two robots for this activity. One of your robots will be tasked with staying inside a circle made out of a black line.

The second robot will mimic the movements of the first robot without being inside the circle.

How To

First, program your first robot to stay within a black line. Follow the pseudo-code below:

  1. Turn on line tracker
  2. If line tracker is on black then transmit data, move backwards, and then turn a bit to the right or left.
  3. Else, go forward
  4. Loop steps 2 and 3

Next, program your second robot to move forward unless it receives data from the first robot. Follow the pseudo-code below:

  1. Receive data
  2. If data says there is a black line then, move backwards, and then turn a bit to the right or left. Make sure it is the same movement the first robot does.
  3. Else, go forward. Make sure it is the same speed as the first robot.
  4. Loop steps 1-3

Going Through a Maze

Use your knowledge from the "Hit a Wall" and "X Marks the Spot" assignments to program your Edison to go through a maze. You will also need to be able to detect a black X that ends the maze.

Be careful how you program your robot. The maze will not always be the same for each robot that goes through it. Your robot should be able to detect walls to help itself navigate through any maze. It should also be able to detect a black X on the ground of the maze. You will need to learn to use the line tracker.

When your robot has found the black X, have your robot stop and then do a victory dance. Add sound to your victory dance for extra credit.

X Marks the Spot

Write a program for your Edison Robot that drives it forward until it find a black X on the ground. X marks the spot! Have your Edison Robot stop on the X.

When your robot has found the X, have it do a little dance.

Use the course Mr. Ramstad has set up in the back of the classroom.

Hit a Wall

Assignment

Have your Edison robot drive straight into a wall. When your Edison hits the wall, have it back up, turn and go around the obstacle.

How To

Activate your Edison's obstacle detection using this line of code:

  • Ed.ObstacleDetectionBeam(Ed.ON)

Read of obstacle detection beam using this line of code:

  • Ed.ReadObstacleDetection()

Reading the obstacle detection beam can give you these results:

  1.     Ed.OBSTACLE_AHEAD
  2.     Ed.OBSTACLE_LEFT
  3.     Ed.OBSTACLE_RIGHT
  4.     Ed.OBSTACLE_NONE

You will need a loop that continually uses an if statement to check for the obstacle.

Edison Basics

Make sure you have created an account on Edpyapp.com

Complete these tasks and show them to Mr. Ramstad to have him check off your work. It is a good idea to save each program in case you need to come back to it later.

  1. Make the Edison drive forward 5 inches.
  2. Make the Edison drive forward 5 inches, turn around 180 degrees, and drive back to where it started.
  3. Make the lights blink back and forth 3 times.
  4. Complete the mini maze and blink the lights when the Edison crosses the finish line.

Functions to use:

  • Ed.Drive(direction, speed, distance)
  • DIRECTION
    • Ed.FORWARD
    • Ed.BACKWARD
    • Ed.SPIN_LEFT
    • Ed.SPIN_RIGHT
  • SPEED
    • Type an integer from 1 to 10
  • Distance
    • Type an integer from 1 to 32767 (1 to 360 for spinning)
      • Ed.DistanceUnits = Ed.TIME
        • (sets distance units in milliseconds)
      • Ed.DistanceUnits = Ed.CM
        • (sets distance units to centimeters)
      • Ed.DistanceUnits = Ed.INCH
        • (sets distance units to inches)
  • Ed.LeftLed()
    • Ed.LeftLed(Ed.ON)
    • Ed.LeftLed(Ed.OFF)
  • Ed.RightLed()
    • Ed.RightLed(Ed.ON)
    • Ed.RightLed(Ed.OFF)

Meet your Edison v2 Robot

Time to program robots! The Edison v2 robot can be programed using the EdWare software or EdPy software. In our class, we will be programming our Edison robots using the Python programming language.

Initial Setup

Go to Edpyapp.com.  Make sure the "Test_Program" works on your Edison Robot before moving on:

  • Go to edpyapp.com
  • Click "Test_Program"
  • Click "Program Edison"
  • Connect your Edison robot
  • Press the record (circle) button on the Edison
  • Program the Edison

If it does not, please see Mr. Ramstad for assistance.

    Repl.it - If/Else Conditionals

    Make sure you already have joined Mr. Ramstad's class on repl.it.

    These exercises help develop your ability to create conditional statements in Python.

    Note: It may be helpful to know that if you want to find the remainder of a division problem, use the % operator. For example, "print(4%3)" would give an output of "1". "print(5%3)" would give an output of "2".

    Repl.it - Using input, print, and numbers in Python

    Please sign up for repl.it using your LAUSD Google login by clicking the link below:

    https://repl.it/classroom/invite/Fkwzpxn

    When you sign in, you will see over 100 assignments!!! DON'T WORRY. We will not be doing all of them. Just the important ones.

    The first lessons I would like you to complete are about user input, print, and numbers. The lessons are linked below. Make sure you are signed in with your LAUSD Google account.

    • Complete lessons 1.1 through 1.4

    Please STOP when you have finished Lesson 1.4!

    Unit 5 Research Project

    How does a person’s behavior on social media affect someone’s real world persona and their academic success?
    — ECS Research Question

    Here is a list of some of the questions we have created that are designed to help answer the research question:

    • How often do you use social media.
    • Does your behavior change when you go on social media? Does it change in a positive or negative way or do you not change at all.
    • How much time do you spend using social media in a daily basis (min) ?
    • Is social media affecting your academic success?
    • What do you use social media for?
    • Could you live without social media ?
    • Is social media a better way to communicate or in the real-world ?
    • Are you or do people say you are different online than in person?
    • What are your grades and GPA in school?
    • Have you ever been affected by something or someone on social media? If so, was it a positive or negative effect?
    • Have you ever affected someone or something on social media? if so, was it a positive or negative effect?
    • How has social media affected you in your academics?

    Student Survey/Data Collection

    We will take a vote on which student survey the entire class will use to collect our data.

    Final Data

    Click here to view the data

    Answer the following questions in your data analysis Google Doc in your Google Drive "Shared with Me" folder.

    • How many students answered the survey?
    • What percentage of students were male, female, and other?
    • Make a chart that shows all the social platforms used.
    • What is the most used social platform used?
    • What is the average amount of time students spend on social media each day?
    • What is the average happiness level of students when they use social media?
    • Make a pie chart of the grades of students that use social media more than the average amount?
    • Do students believe social media affects their academics?
    • Make a pie chart of the how many students were affected negatively on social media vs. how many were not.
    • Why do you believe students use social media? Use quotes from students to prove your point.

    Final Reflection

    Click here to complete your Unit 5 Final reflection

    Unit 4 Final Project

    Project Details

    Your task is to create a Scratch program that does one of the following:

    • Creates a game
    • Creates a presentation
    • Uses Storytelling

    You may choose any one of the following topics:

    1. My Community Project
      • Decide on at least one positive thing that you want to highlight and at least one thing you want to improve about your community.
      • Research and use statistics to back up your conclusions. (cite your findings)
      • Include personal comments/recording.
      • Include at least one picture.
      • Use at least 6 of the 8 block options.
      • Multiple scenes/screens (3+)
      • Show/hide sprites
    2.  My Career Project
      • Choose a career or two you are interested in.
      • Research and present criteria and requirements of the career(s). (cite your findings)
      • Include personal comments/recording.
      • Include at least one picture.
      • Use at least 6 of the 8 block options.
      • Multiple scenes/screens (3+)
      • Show/hide sprites
    3.  My Dreams Project
      • If you had no limitations, what is your biggest dream(s)?
      • Research and present information that relates to your topic. (cite your findings)
      • Include personal comments/recording.
      • Include at least one picture.
      • Use at least 6 of the 8 block options.
      • Multiple scenes/screens (3+)
      • Show/hide sprites

    Rubric

    View the Rubric

    Peer review

    View peer review form (will open Google Drive)

    Presentations

    View presentation sign-up

    End of Unit Reflections

    Click here to fill out your reflections

    Timeline

    • 04/05/17 - Create idea and start project
    • 04/07/17-04/26/17 - Work on project (that's about 6 hours worth of class time)
    • 04/24/17 - Take 20 minutes for peer review
    • 04/28/17 - Project Presentations

    Game Investigation - Pinball

    Answer these questions on paper:

    1. Look at the scripts for the pinball. How did the author simulate gravity?
    2. How does the ball know when to "bounce" off of something?
    3. Does the ball always bounce the same way when it hits something?
    4. How do you think the ball determines which direction to bounce?
    5. What's the purpose of the purple line at the very bottom of the game?
    6. What other features do you think would make this game better?

    Make these changes to this Scratch Project (make a remix): 

    1. Add scoring to the game
      • Decide the points a player gets when they hit different bumpers
    2. Display the score to the player

    Game Inverstigation - Monkey Game

    Answer these questions on paper:  

    1. Play the game by using the arrow keys.  What blocks make the monkey respond to the keys?  
    2. Does the banana always appear in the same place?  
    3. What blocks do you think decide what x and y the banana should change to?  
    4. What are the names of the orange blocks under Variables?  
    5. What block(s) are used to change the score?  

    Make these changes to this Scratch Project (make a remix): 

    1. Customize the sprites in the game (make the characters be who you want).  
    2. Add another sprite that gives you 2 points if you touch it.
    3. Get the game to stop at 10 points or more by telling you that you win. 

    Timing Game

      Make a Timing Game

      Create a game that uses a timer and has sprites that use timers. Have the player complete "something" before the timer runs out. Make sure your game keeps score and gives the user feedback on how well or how poor they are doing.

      View Rubric

      Add your game to this studio to share with the class.

      Reflections

      Fill out the Google Form to reflect on your work and the work of your classmates.

      Making a Timer in Scratch

      1. Create a variable called timer
      2. When the flag is clicked, initialize the timer to 10.
      3. Continually, wait 1 second, change the timer by -1, and then check if the timer = 0
        • Output the current time either with a sprite or just show the variable.
        • If the timer = 0, then make either the background or a huge sprite say "Time's up!"
      4. When the flag is clicked, then everything should start over.
      5. Be creative as to what you want your program to look like.
      6. Make sure the timer stops at 0 and does not continue into negatives.

      Game Ideas

      • Clicking
      • Rhythm
      • Platform
      • Typing
      • Put something in order (puzzle)
      • Catch something
      • Maze
      • Quiz

      Extras

      Example