Play
Part 1 - Step by Step
- InstructInstruct students that they are going to test out our Code/Day Night build by building a project in VEXcode that uses the LED light on the Eye Sensor to illuminate the Earth. They will use VEXcode GO to show day and night, instead of using the Switch like they did in the previous Lab.
-
Share this animation below with students and remind them that they will need to start their projects with the dot directly facing the Sun. VEXcode is used to spin the Earth on its axis with an LED light illuminating one side of the Earth as it spins.
Video file - Students will build the first part of this project along with you, coding the Earth to rotate 180 degrees away from the Sun. They will test it out to view the dot on the Earth and the nighttime position, and how the LED light illuminates the model, making this easier to see.
- Then they will code the second part of the project, rotating the Earth back to directly face the Sun, in their groups.
-
- ModelModel for students how to build the project in VEXcode GO and test their projects.
- Begin by showing students how to connect the Brain on their Code Base to their device in VEXcode GO. Because connection steps vary between devices, see the Connecting articles of the VEXcode GO section of the VEX Library for specific steps to connect the VEX GO Brain to your computer or tablet.
- They will also need to configure VEXCode GO so that the blocks in the Motion and Sensing categories are available to them. Have students follow along with these steps to do so:
-
Select the Devices button in the right hand corner to open the Devices window.
-
Select 'Add a Device'
-
Select 'CUSTOM ROBOT'
-
Next, select 'MOTOR'.
-
You will be asked to select a Port. In the Code Day/Night Build, the Motor is plugged into Port 1, so select '1' in the configuration.
-
It is not necessary to change the name or direction of the motor, so select 'DONE'.
-
- Follow the same process to configure the Eye Sensor.
-
First select 'Add a Device.'
-
This time, select 'EYE.'
-
You will be prompted to connect your Eye Sensor to the Eye Port. Since you already did this when you build the Code Day/Night Build, select 'DONE'.
-
Close the Devices Window by selecting the arrow. Your Code Day/Night Build is now configured!
-
- Then start to build your project together.
-
Drag a [Set eye light] block into the workspace and attach it to the {When started} block.
-
Then add a [Spin for] block to the project.
-
Change the parameter in the [Spin for] block to 180 degrees, because in this part of the project, we want the Earth to rotate to the night time position, with the dot facing directly away from the Sun.
-
Have them run the project to test, by selecting 'START' in VEXcode GO.
- The Earth should rotate so that the dot is facing directly away from the Sun. Ask students to describe the model, and what they would see if they were at the same place on Earth as the dot.
-
- Now that students have completed the first half of the project with you, explain that they will now code the Day/Night Build to rotate so the dot once again faces the Sun directly.
-
First have them drag a [Wait] block into the Workspace and attach it to their project. This will cause the Earth to pause at the night position briefly, to allow students to make observations about the day/night cycle.
- Then challenge them to choose a block that will rotate the Earth back to face the Sun, and add it to their projects.
- Once students have built their project, have them name their project as Earth and Sky with LED and save it to their device. See the Open and Save section of the VEXcode GO VEX Library for device-specific steps to save a VEXcode GO project.
-
- FacilitateFacilitate discussion about their VEXcode projects, and the Code Day/Night Build.
- How does adding the LED enhance the day/night model?
- What block did you use to rotate the Earth back to face the Sun?
- Did you need to change the parameter in the block you used? What did you change it to, and why?
- Do we need the [Wait] block in the project to model the Day/Night cycle?
- RemindRemind students that the [Wait] block in their project is serving a purpose - to allow them to make observations about the Earth's position when it is night, but that in reality, the Earth does not pause, but is continually rotating on its axis.
- AskAsk students about where they have encountered other scientific models, and the reasons scientists make them.
- Think about where you have seen other models of scientific ideas. What ideas were the models explaining?
- What are some of the reasons scientists use models in their work? Do you think some kinds of scientists might find models more useful than others?
- If you were going to make a model of a scientific process or pattern, what would you choose?
- Do all models have to be physical, or can they be digital as well? If so, where have you seen a digital model of a scientific process or pattern?
Mid-Play Break & Group Discussion
As soon as every group has added a block to code the Earth to rotate back to face the Sun, come together for a brief conversation.
- Now that we've created a VEXcode project to demonstrate the day/night cycle using the Brain and the LED light. which model do you think is better, and why?
- If you wanted to create a VEXcode project that helped to explain why it appears that the Sun is moving across the sky, what blocks do you think you could use to code it?
Part 2 - Step by Step
- InstructInstruct students that they will now build on what they have learned to create a VEXcode project for their Code Day/Night build that helps explain why it appears the Sun is moving across the sky throughout the day. They will code the Earth to spin and pause for 6 hours in a row, so they can observe and document how the Sun would appear from the dot on the Earth over the course of all six hours. Watch the animation below to see the Earth spin and then pause for an hour at a time, with the degree of rotation displayed and updating as it spins.
Video file
- ModelModel for students how to build the project in VEXcode GO.
-
Begin by removing the [Spin for] and the [Wait] blocks from the project they made in Lab 1. The project will now look like this:
- Student should then add three [Comment] blocks. Have them insert the times 1:00, 2:00, and 3:00 into the comments. Explain that we are going to use the comments to keep track of each hour we code in our project.
- Then, have students add the [Spin for] block underneath the 1:00 [Comment] block, reminding them that we can set the parameter in the block so the motor will rotate the Earth the equivalent distance of one hour.
- Next, demonstrate how to determine the number of degrees to set in the parameter.
- Explain to students that we want the Earth to rotate just one hour’s worth of distance at a time, but first we will need to figure out how many degrees that would be.
- Walk students through this calculation:
- One full rotation of the Earth is 360 degrees, and one Earth day is 24 hours. If we divide 360 degrees /24 hours, we get 15 degrees, so we need to spin our motor forward for 15 degrees for each hour’s rotation.
-
Now, have students type 15 into the parameter in their [Spin for] block.
- Then select ‘Start’ in VEXcode GO to test the project.
-
Students should observe the position of the dot on the Earth in relation to the Sun. Each time students test their projects, they should be sure that the dot on the Earth is facing directly towards the Sun before they press Start.
- Then, demonstrate adding another hour to the VEXcode project. Drag in a [Wait] block and attach it to the [Spin for] block. This will have the project pause at the 1:00 position before moving on to the next hour. Otherwise, the Earth would continue to rotate without stopping. Have the students follow along with you as you do this, and then change the parameter in the [Wait] block to 2 seconds. This will allow students time to observe the position of the dot in relation to the Sun as their project is running.
-
Next, have students continue adding to the project to code the next two hours, following along as you add blocks, continuing in the same pattern. Have students run their projects to test, observing the position of the dot in relation to the Sun for each hour.
- Now, students should continue adding blocks to the project, following the same pattern, until the Earth rotates in one-hour increments for six consecutive hours.
- Finally, students should run their projects, and observe where the Sun is in relation to the dot on the Earth each time it pauses at the [Wait] blocks. They should pay close attention to the pattern of the Sun appearing to move across the sky.
- Once students have built their project, have them name their project as Earth's Hourly Rotation and save it to their device. See the Open and Save section of the VEXcode GO VEX Library for device-specific steps to save a VEXcode GO project.
- For students who finish quickly and need an additional challenge, have them try to simplify their code by adding a [Repeat] block to their project. Can they accomplish the same goal with fewer blocks?
-
- FacilitateFacilitate a conversation about with students as they test their projects and observe the movement of the Code Day/Night build.
- What pattern did you notice in the project? Can you use that pattern to add the next three hours to the project?
- Can you think of a different way to code the project and still get the Code Day/Night build to move in the same way?
- What do you notice about the position of the Sun relative to the dot on the Earth as each hour passes? What pattern do you notice there?
- If students are having difficulty visualizing this pattern, have them stand up at their seats and act out the motion of the Code Day/Night Build (similar to what they did in the Engage section of the Lab). They should use the front of the room as the Sun, and rotate along with the Earth in their model. Have them keep one arm pointed at the Sun (at the front of the room) as they rotate, to help them internalize the pattern.
- Assuming we started the project at noon (12pm), can you predict the position of the Sun and Earth at midnight? What about at 6:00 am?
- RemindRemind students to be sure to set the parameters correctly in both their [Spin for] and [Wait] blocks, as they will affect the performance of the Code Day/Night Build when they are trying to observe the scientific pattern.
- Emphasize for students that making mistakes is part of coding, and the important thing is to learn from them along the way.
- AskAsk students to consider why it is important to understand what is happening during the day/night cycle, and the position of the Earth's rotation at different times of day?
- How does the day/night cycle affect plants and animals?
- How might we use knowledge of the day/night cycle to improve things like human health or transportation in cities?
- What kinds of careers can you think of that are directly affected by the day/night cycle?