Teacher Toolbox - Facilitating the Pick Up the Disk Using UI Page
What the Teacher Will Do:
- Instruct students that they will be working together in their groups to follow the steps on this page.
- Circle the classroom as students work through these steps and answer any questions that arise.
- As groups check in, ensure they have built their project correctly before moving on. Guidance for this check in is provided in a Teacher Toolbox at the bottom of this page.
For Your Information
The ‘Arm UI Panel’ example project is a type of User Interface or 'UI.'
A UI is a method to allow a user to interact with a computer system (or machine) to provide input or observe outputs. The ‘Arm UI Panel’ example project will allow you to code four different colored boxes on the V5 Brain’s screen.
The Brain’s screen displays 48 columns with a range of 0 to 480 pixels along the x-axis, and displays 12 rows with a range of 0 to 240 pixels along the y-axis. When you code the boxes on the Brain's screen, you will create a way to interact with the arm on the Workcell so that it can move to different known locations.
Now that we have coded the arm to pick up and sort the red disk using known locations, we will now code the arm to pick up the red disk from the pick up location using the UI on the Brain's screen.
First, you will create the 'Lab 7- Sort Disk' project.
In VEXcode V5, follow the steps in this video to open the 'Arm UI Panel' example project, input your mastering values, name, and then save the project.
Ensure you are using your mastering values, and not the ones displayed in this video.
For Your Information
The 'Lab 7- Sort Disk' project contains [Comment] blocks. Comments are usually added to projects to explain what a programmer wants parts of a project to do. Comments are helpful when collaborating and troubleshooting, as they provide context and overall meaning to the code.
Comments such as 'White Box Pressed' helps to communicate different sections and blocks of the project. This allows you to remember which blocks move the arm to the pick up and drop off locations.
Follow the steps in this video to add blocks beneath the 'White Box Pressed' comment. These blocks and coordinates are used to code the arm to move to the pick up location and pick up a disk when the white box is pressed on the Brain's screen.
Use your coordinates for Points 1 and Point 2 in the [Joint move] blocks shown.
Download and run the project. Four different colored boxes will be displayed on the Brain’s screen.
Place the red disk back into the pick up location, and then press the white box on the Brain's screen. The arm will move to the pick up location, pick up the red disk, and lift it up and out of the pick up location.
If your arm did not pick up the disk, notify your teacher.
Once you have finished coding the arm to pick up the disk using the white button on the Brain's screen, stop the project.
Teacher Toolbox - Troubleshooting
If groups are finding that the arm does not pick up the red disk when they run their project and press the white square, try the following troubleshooting techniques.
- Check the location of the blocks in the project. Ask students to verify that the blocks they added are beneath the 'White Box Pressed' comment.
- The electromagnet may not reach the disk or may be too low to clear the standoffs in the pick up location. Have students change their z-values and test the project.
- Check the mastering values.
- Instruct students to check that the mastering values they recorded in their engineering notebook during Seek match what is in the [Set mastering] block.
- If the problem still persists, have students follow the steps in Seek to rerecord their mastering values.
- Check the VEXcode V5 project.
- Have students compare their project to the video on this page and ensure the order of the blocks match. Make sure students are re-downloading their project each time they make a change and before they run the project
- Check the build.
- There may be a mechanical issue with your Workcell. Instruct students to look at the Lab 7 build instructions first and verify that the additions to their Workcell match.
- Have students go back to the Lab 1 build instructions for a complete look at the build and check that all elements match. Even one small detail being wrong can affect the movement of the arm on the Workcell.
Teacher Toolbox - Check in
Review the following with the group during their check in:
- Ensure groups have built their project correctly. View this example code as reference. Note that the coordinates will vary depending on the group.
- Ensure that groups set the [Energize electromagnet] block beneath the 'White Box Pressed' comment to 'boost.'