VEXcode VR : Basketball Drills
So for my Week 5 assignment, I have worked on VEXcode VR Basketball.VEXcode VR is usedto code a virtual robot using a block coding environment which are similar to block Scratch coding. VEXcode VR is based on VEXcode, the same programming software that we use for our robot's coding. Which is used for VEX 123, GO, IQ and V5 robots. This also offers different sets of activities and problem-solving simulations that help sharpen your coding skills .This is a way we can still remember how to code so that when we get back from this quarantine, we are ready to go. The activity we are working is related to basketball drills. here we have to code to pass through different levels of drills. The objective is to code in a certain way make the robot perform those drills.
|
|
Activity Showcase Sheet.
|
Level 1
|
The first level was pretty basic. The purpose was to code in a certain way that the VR Robot drives forward 1 grid square, drives reverse to the beginning point. Continue this pattern for 2 grid squares, then 4 grid squares. Which is basically what we call suicides. this was pretty simple to block code I just had to put in simple block inputs and it was working.
|
Block Code for Level 1
|
Level 2
|
The Second Level wasn't that hard but it was a bit complex than the first one because the VR Robot had to drive forward 1 grid square, stop, and return back 1 grid square to where the VR Robot started without using the reverse block and turn around to drive back to the first position and continue this pattern for 2 grid squares, then 4 grid squares. This was same as sucicides but just with the turns in it, The Code was kind of lengthy but all I had to do was to add turn 180 degrees and it was pretty much done.
|
|
Level 3
|
This is where things got complex because the matter and the block code was different since the objective was to build an algorithm to move through all 1 to 8 grid squares in sequential order. which means that the VR Robot should move to 1, go back to start, move to 2, go back to start and continues for all 8 grid squares. at first, when I was done code was very lengthy and slow plus boring. So after that what I did was that I shortened it by at repeat loop in it which repeated for 8 times and a variable increase which increased 200mm or one grid every rep and to make it more fast, I increased the drive velocity to 100% and did the same with thw turn velocity and to make it more interesting I had made the pen colour green.
|
|