Pick Up the Disk Using UI
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.