Student sheet 1 Perform in the spotlight Let s get the Edison robot to play music or dance when it detects light, just like a performer in the spotlight! To do this, there are a few things we need to learn: What is a robot? How does the Edison robot work? How do you make a program for Edison using the EdBlocks coding language? How do you download a program from EdBlocks to Edison? What do Edison s light sensors do? What is an infinite loop? How can you use the sensors to make the robot react? What is a robot? A robot is a machine that can be made to do a task on its own. There are many types of robots. Different robots can do different things. What do you think of when you imagine a robot? This is Edison. Edison is a programmable robot, which means that Edison can be programmed. Programmed means that we can tell Edison what to do. We can program Edison different ways. One way to program Edison is by using a programming device, like a computer, with a programming language called EdBlocks.
Student sheet 2 How does the Edison robot work? Edison has different parts that let the robot do different things. The motors and wheels let the robot move. The speaker makes noise. And the sensors let the robot react to different things. In the pictures below, you can see all of Edison s different parts. Can you find all of these parts on your Edison robot? Record button Stop button Play button This is the top of Edison. Speaker/sound sensor Left red LED Left infrared LED Left light sensor Right light sensor Right infrared LED Right red LED This is the bottom of Edison. Power switch Line tracking sensor EdComm cable EdComm cable connection holes
Student sheet 3 How do you make a program for Edison using the EdBlocks coding language? EdBlocks is a robot programming language we can use to program Edison to do different things. You can attach different blocks in EdBlocks together to make a program for Edison. Block 1 Block 2 Block 3 Block 4 Block 5 An EdBlocks program tells Edison what to do, step-by-step. This is called sequence. Imagine you are baking a cake. How would you know what to do? When you read a cookbook, you follow each step one-by-one. Edison also uses sequence and follows steps one-by-one. The EdBlocks program gives Edison each step to do and the order to do each one. Edison reads EdBlocks from left to right, starting at block one. Edison then moves along the EdBlocks program, one block at a time. Just like a person, Edison can also follow instructions in order, but the robot needs the instructions in blocks of code, not words.
Student sheet 4 How do you download a program from EdBlocks to Edison? You can make different programs for Edison in EdBlocks which tell Edison what to do. Once you write a program for Edison, you need to download it from your computer to your Edison robot. On your computer, go online to: First, let s load a program that has already been made and download it to Edison. Step 1: Check the computer Make sure the volume is turned up all the way on the computer. Step 2: Open the EdBlocks app This is the app at Step 3: Select Menu After opening the app, look in the top left corner. Click on the Menu button. Menu Step 4: Select Load Demos Scroll down and find Load Demos in the list. Click on Load Demos. Load Demos Step 5: Select Follow torch/flashlight Find and click on the program called Follow torch/flashlight. A program will open in the main screen. It looks like this:
Student sheet 5 Step 6: Plug Edison in Connect Edison to the computer with the EdComm cable. Step 7: Get Edison ready Push the record button (round button) on Edison one time. Step 8: Program Edison Look in the top right corner of the app. See where it says Program Edison? Click on Program Edison. Program Edison A new pop-up message box will open. Program Edison Program Edison Edison cannot understand the blocks in EdBlocks the way they look on your computer screen. The blocks need to be changed into a format that Edison can understand before the program can be downloaded. This can take a bit of time. Once the program is ready, the bottom of the pop-up box will have a button that says Program Edison. Click on this button. You will hear the program being downloaded to Edison. Once it is done downloading, Edison will beep. Don t unplug Edison until you hear the beep! Once you hear the beep, unplug Edison. Grab a torch (called a flashlight in American English) and get ready to run the program in Edison.
Student sheet 6 Put Edison on the floor or table. Get your light ready. Press the play button (triangle button) one time. Now shine the light at Edison. Edison will follow the brightest light it detects around. Stop Edison by pushing the stop button (square button). What do Edison s light sensors do? Edison has two light sensors, one on the left and one on the right side of the robot. These light sensors let Edison detect and measure visible light. (Visible light is the portion of the light spectrum that people can see.) When the sensors detect light, they measure that light to see how bright it is. The measurement gets a number value. That value is then stored as a light reading in the robot s memory. The more light that is detected, the higher the light reading. Look at the demo program called Follow torch/flashlight again. When you ran this program in Edison, you saw that this program makes Edison follow the brightest light it can detect. If the brightest light is on the left, the robot moves left. But if the brightest light is on the right, the robot moves right instead. Edison will keep moving, following the brightest light forever. This is because the program uses an infinite loop.
Student sheet 7 What is an infinite loop? A loop is a special type of code. Loops make any code blocks inside the loop repeat. How many times will the code blocks repeat? That depends on the loop! Some loops tell code to repeat a certain number of times. Other loops tell the code to repeat until a specific event happens. The type of loop in the Follow torch/flashlight program is called an infinite loop. This loop makes the code blocks repeat forever! Try making your own program for Edison using the infinite loop block and four other blocks in the EdBlocks app. (Hint: try using blue drive blocks!) Download the program to Edison and run it in the robot. Write down your program here. What does your loop program do? What happened when you ran the program in Edison? Describe what happened. Don t forget to stop Edison by pushing the stop button (square button) one time!
Student sheet 8 How can you use the sensors to make the robot react? You can write programs for Edison that tell the robot to wait, then react, once the sensors detect something. Let s make a program that gets Edison to play music or dance when a light is detected, like a performer in a spotlight! Get performance-ready For this program, we only want Edison to detect light from one side. You need to cover the opposite side of Edison with dark tape or cardboard. This will help the robot measure the light on one side better. Using something like cardboard or tape, block out one of Edison s light sensors on one side of Edison. Be careful not to cover the buttons, the speaker or the wheels! We want the robot to perform whenever it detects light. We don t want the robot to start too early, however. That s why the first block in your program should be a block that tells the robot to wait a few seconds. You can use that time to sneak Edison into the shadows, waiting for the right time to shine! You will need somewhere dark for Edison to sit while waiting, like a desk drawer. Where is another dark place you can put Edison? Maybe you can try a backpack or a lunch box? Choose some places to try out when you are ready to run your program. But first, you need to write your program!
Student sheet 9 Write a program Using the EdBlocks app, arrange blocks into a program like the program below. Your program first needs to tell Edison to wait for five seconds. (You will use this time to move Edison somewhere dark.) Then, it should use an infinite loop. The first block inside the loop should tell Edison to wait until it detects light. The rest of the program is up to you! What should Edison do when it detects the light? What music should Edison play? Should it move? Add some blocks to get Edison to play a tune, move or do both! Make sure all of your music and drive blocks are after the wait for light block and all are inside the loop. Which side should Edison use to detect the light? You can choose! If Edison is looking for light on the left side, the right side of your Edison robot needs to be covered. If Edison is looking for light on the right side, the left side of your Edison robot needs to be covered. When you are ready, downloaded your program to Edison. Press the play (triangle) button one time, then put Edison in the drawer or another dark spot. When you open the drawer, Edison will detect the light and perform!
Student sheet 10 Optional: costume time! Let s dress up Edison for the robot s performance in the spotlight! What do you want to dress up Edison to look like? Use craft supplies and make your own character costume for Edison. Remember that your costume needs to cover one side of Edison, but leave the buttons, speaker and wheels uncovered. What did you make? What did your program look like? What was your costume? Write about your program and your costume, then draw your costume on the outline of Edison.