ROBOTC.net Blog  

ROBOTC News

Archive for the ‘VEX IQ’ tag

Mentoring Program uses ROBOTC and VEX IQ to Teach STEM and Connect with Military Families

without comments

Tyrrek Grizzle poses with a robot he constructed during the robotics summer camp. The camp is part of an ECU partnership that supports elementary and middle grades students from military families in eastern North Carolina. (Photos by Jay Clark)

Tyrrek Grizzle poses with a robot he constructed during the robotics summer camp. The camp is part of an ECU partnership that supports elementary and middle grades students from military families in eastern North Carolina. (Photos by Jay Clark)

We were delighted to hear about an inaugural weeklong robotics summer camp happening in North Carolina that is using ROBOTC, ROBOTC Graphical, and the VEX Robotics IQ system to help teach students STEM while keeping them connected to their military families. (One of the mentors was trained at the Robotics Academy last summer too!) Read the story and watch the video highlighting this program below!

Reblog from East Carolina University’s News Service

POSITIVE CONNECTIONS
ECU partners in Operation LINK mentoring program

Ten-year-old Tyrrek Grizzle took control of his paddle, maneuvering his miniature land mover with ease.

He and a teammate moved his robot across a grid and past an opponent to pick up as many green-colored blocks as possible and dump them in a coordinating green basket. The team that filled the basket with the most blocks in the three-minute competition won.

Grizzle attended an inaugural weeklong robotics summer camp through Operation LINK, an AmeriCorps school-based science, technology, engineering and mathematics mentoring program for elementary and middle grades students in eastern North Carolina. The STEM program, with a special emphasis on students from military families, will transition from an afterschool program to part of the regular school day this fall.

 


 

Offered this spring in Wayne County, the program aims to promote positive behaviors and success in school while keeping military youth connected to family. It’s a partnership between East Carolina University, AmeriCorps, military family support networks, veterans groups, community colleges and public schools.

The summer camp, held at Greenwood Middle School in Goldsboro, allowed students to make real robots from designs they developed in their afterschool program.

Counselors and campers used a box kit to construct a robot with up to 650 pieces. A software program (ROBOTC) developed at Carnegie Mellon Robotics Academy gave the students the ability to control movements.

“We had fourth-graders writing code,” said Michael “Mike” Dermody, associate professor of cinematic arts and media production in the ECU School of Art. Dermody, who grew up in a military family, said “It’s amazing how quickly they adapt. It’s a very tactile and hands-on experience. They go in and test and modify it. There’s lots of activity between the computer itself and the robot.”

For Grizzle, a rising fifth-grader at Tommy’s Road Elementary School, taking his work from the computer lab to create a functioning robot is exciting. “Robots help you in a lot of ways,” said Grizzle. “They help us do things we can’t normally do ourselves.” Grizzle has cousins who serve in the military.

Amy Perry, left, watches as her daughter, Kayla Perry, works at the Operation LINK afterschool program held this spring in Goldsboro. Amy Perry is a technical sergeant in the U.S. Air Force, where she inspects aircraft for defects at Seymour Johnson Air Force Base.

Amy Perry, left, watches as her daughter, Kayla Perry, works at the Operation LINK afterschool program held this spring in Goldsboro. Amy Perry is a technical sergeant in the U.S. Air Force, where she inspects aircraft for defects at Seymour Johnson Air Force Base.

The pilot program will become part of the curriculum this fall at three Wayne County schools with a higher population of children from military families, said Lou U. Rose, Operation LINK coordinator in the ECU College of Education, which has facilitated the program.

“We will be able to impact more kids that way.”

Area teachers observed some of the program activities. “Some will do it as an elective in science and math classes,” Rose said.

“The beauty of this is they can tailor it and run with it and be creative. It brings relevancy in the real world, and maybe will get students interested in science.”

Michael Giddens, an AmeriCorps camp mentor who earned a teaching certificate in middle grades science and math from ECU in May, said students learned to collaborate and work as a team at the camp.

“The energy has been electrifying,” Giddens said. “Keeping them (students) engaged is a challenge in the classroom in the 21st century.”

One old-fashioned value students have learned has been patience, Giddens said, such as when broken robots have had to be re-assembled. Now poised to reach more students, the initial idea for the Operation LINK program was to create a way for military parents to interact with their children – via the web – while the parents were away from home. “It’s (been) a way to keep the child connected,” Dermody said.

USAF airman first class Eagan Nadeau pilots one of the student robots.

USAF airman first class Eagan Nadeau pilots one of the student robots.

Amy Perry’s nine-year-old daughter Kayla and 10-year-old daughter, Alexis, participated in the afterschool program. Perry, a technical sergeant in the U.S. Air Force, inspects aircraft for defects at Seymour Johnson Air Force Base. The Perry family doesn’t have a computer, internet or cable in their home. So the program has helped support her girls’ interests in science and technology. “It works for us,” she said.

Perry said the counselors encouraged her daughters’ unique personalities. “It’s allowing them to have the space to be who they are,” she said. “Respecting others is important.”

Kayla Perry said she enjoyed the computer lab and making a virtual robot. “I like the teachers. All the time they think of cool things for us to do,” she said. “They always come up with these amazing ideas.”

Program activities have helped build relationships between mentors and students, and among students, said Virginia Harris, a retired teacher and military spouse who taught 23 years in several states and overseas.

“I’ve seen changes in the students, being able to work together and learning to follow rules better,” Harris said. “One of the main things they learn is you’re not an island. You have to get along with people in life. I think it’s difficult for little people to work together as a team sometimes.”

To learn more, visit www.ecu.edu/operationlink.

Logan Chase, 10, works on programming after a practice session with his robot.

Logan Chase, 10, works on programming after a practice session with his robot.

Reblog from East Carolina University’s News Service

Written by Cara Friez

July 24th, 2014 at 11:26 am

Curriculum Preview: Intro to Programming VEX IQ for ROBOTC!

without comments

header_splash_v2

We are excited to give you a preview into our newest curriculum series: The Introduction to Programming VEX IQ with ROBOTC. The website is still in-the-works, but it should be completely ready by August. The focus for this curriculum is on the VEX IQ virtual and/or physical robot and the ROBOTC 4.0 software featuring the new  graphical function. It consists of videos, PDFs, quizzes, and our famous easy to use step-by-step videos. Check out some of the videos of from our curriculum series …
 


 

 

 

The Introduction to Programming VEX IQ with ROBOTC is a curriculum module designed to teach core computer programming logic and reasoning skills using a robotics engineering context. It contains a sequence of projects (plus one capstone challenge) organized around key robotics and programming concepts.

Why should I use the Introduction to Programming EV3 Curriculum?

Introduction to Programming provides a structured sequence of programming activities in real-world project-based contexts. The projects are designed to get students thinking about the patterns and structure of not just robotics, but also programming and problem-solving more generally. By the end of the curriculum, students should be better thinkers, not just coders.

What are the Learning Objectives of the Introduction to Programming VEX IQ Curriculum?

  • Basic concepts of programming
    • Commands
    • Sequences of commands
  • Intermediate concepts of programming
    • Program Flow Model
    • Simple (Wait For) Sensor behaviors
    • Decision-Making Structures
    • Loops
    • Switches
  • Engineering practices
    • Building solutions to real-world problems
    • Problem-solving strategies
    • Teamwork

For more info and to see the online version of the curriculum, visit http://curriculum.cs2n.org/vexiq.

Written by Cara Friez

July 17th, 2014 at 7:45 am

Cool Project: VEX IQ Great Ball Contraption

without comments

VEX IQ Great Ball Contraption 0134The engineers at VEX had some fun one weekend and built this Great Ball Contraption. It was featured at Brickworld 2014 as part of one of the world’s largest GBC’s!
 
 
 
 
 
 
 
 

Each module was created independently with common inlet/outlet bays so that they could be reconfigured in any order. They even include some of the new multicolored VEX IQ parts, coming summer 2014!

Do you have a cool project? If so, email us at socialmedia@robotc.net.

Robomatter Blog Ad VEX IQ

 

Written by Cara Friez

June 26th, 2014 at 9:53 am

Cool Project: VEX IQ Quadruped

without comments

Repost from BotBench

In my last post about the VEX IQ building system I had a small video featuring my VEX Quadruped.  I’ve done a bit of work on it since then and the gait has been greatly improved.  I also added some small rubber feet on the legs.  These are the traction links from the Tank Tread & Intake Kit.

Due to the heavy load that these motors are under, you may find that the batteries will run down a bit faster than you’re used to.  Good thing the kits come with a charger!

Up next on the agenda is to add some sensors and have it interact a bit more.  The little wheels on the bottom are not used when it is walking; the robot is fully lifted off the ground.

I’ve taken some picture, so you can see how it’s put together.  These should be enough to copy the design, should you wish to.  You can download the program to run this here: [LINK].  Note that part of the code is based on the excellent guide on creating an Arduino based quadruped: [LINK].

CIMG3355 CIMG3367

CIMG3353 CIMG3354

CIMG3357 CIMG3358

CIMG3359 CIMG3366

CIMG3360 CIMG3361

CIMG3362 CIMG3363

CIMG3364 CIMG3365

Repost from BotBench

 

Robomatter Blog Ad VEX IQ

Written by Xander Soldaat

June 3rd, 2014 at 11:17 am

Announcing ROBOTC 4.10 now available!

with 3 comments

Summer 4.10The ROBOTC Development Team is excited to announce the availability of ROBOTC 4.10 – an update for the both the VEX Robotics (Cortex and IQ) and LEGO Mindstorms (NXT and EV3) robotics systems. This new version includes new features and functionality for all ROBOTC 4.X compatible platforms.

  • Full support for the VEX IQ platform in ‘Robot Virtual Worlds’ – Updated “Curriculum Companion” to support VEX IQ
  • Support for VEX IQ 2.4Ghz International Radios (Requires VEX IQ Firmware 1.10 or newer)
  • Initial Support for I2C devices with EV3 platform
  • Updated Graphical Natural Language with new colors and commands!
  • Support for nMotorEncoderTarget in Virtual Worlds (NXT & Cortex Platforms)
  • Support for motor synchronization in Robot Virtual Worlds (NXT Platform)
  • Initial update of ROBOTC documentation (VEX Cortex/IQ Platforms)
  • Support for Project Lead the Way (PLTW) 2014-2015 School Year Users

Before you can use ROBOTC 4.10, you will need to ensure that your devices are up to date. The instructions to update your hardware will be different depending on what hardware setup you may have…

LEGO NXT Users

  • Simply update to the latest ROBOTC firmware from inside of ROBOTC.

LEGO EV3 Users

  • Update your LEGO EV3′s Firmware/Kernel by connecting your EV3 and select “Download EV3 Linux Kernel” from inside of ROBOTC – This process will take about 5 minutes and will allow your EV3 to communicate with both ROBOTC and the EV3 Icon-Based programming language. After updating your EV3′S Linux Kernel, you’ll be able to install the ROBOTC firmware from inside of ROBOTC.

VEX IQ Users

  • Run the “VEX IQ Firmware Update Utility” and update your VEX IQ Brain to firmware version 1.10. You will also need to update your VEX IQ Wireless Controller by attaching it to your VEX IQ Brain using the tether cable. You will also have to install the latest ROBOTC firmware from inside of ROBOTC.

VEX Cortex Users (with Black VEXnet 1.0 Keys)

  • You will need to update your VEX Cortex and VEX Game Controllers with version 4.22 from inside of ROBOTC. After updating your master firmware, you will also have to install the latest ROBOTC firmware as well.

VEX Cortex Users (with White VEXnet 2.0 Keys)

  • The new VEXnet 2.0 keys have a specific “radio firmware” that you will need to upgrade to enable “Download and Debugging” support. You can find the “VEXnet Key 2.0 Firmware Upgrade Utility” utility here.
  • Link: http://www.vexrobotics.com/wiki/index.php/Software_Downloads
  • Download the “VEXnet Key 2.0 Firmware Upgrade Utility” and insert your VEXnet 2.0 key to any free USB port on your computer. Follow the instructions on the utility to update each key individually. All VEXnet 2.0 keys must be running the same version in order to function properly.
  • After updating your VEXnet 2.0 keys, you will need to update your VEX Cortex and VEX Game Controllers with version 4.22 from inside of ROBOTC. After updating your master firmware, you will also have to install the latest ROBOTC firmware as well.

Here’s the list of changes and enhancements between version 4.08/4.09 and 4.10.

New Features

  • Full support for the VEX IQ platform in ‘Robot Virtual Worlds’ – Updated “Curriculum Companion” to support VEX IQ
  • Support for VEX IQ 2.4Ghz International Radios (Requires VEX IQ Firmware 1.10 or newer)
  • Initial Support for I2C devices with EV3 platform
  • Updated Graphical Natural Language with new colors and commands!
  • Support for nMotorEncoderTarget in Virtual Worlds (NXT & Cortex Platforms)
  • Support for motor synchronization in Robot Virtual Worlds (NXT Platform)
  • Initial update of ROBOTC documentation (VEX Cortex/IQ Platforms)
  • Support for Project Lead the Way (PLTW) 2014-2015 School Year Users

Bug Fixes

  • Fixed issue when deleting graphical blocks and ROBOTC would crash.
  • Improved error messages/status messages for Tele-Op based downloads with VEX IQ
  • Improved Licensing system features to provide more debugging feedback for -9105 errors.
  • Fixed to revert issue causing bad message replies on the VEX Cortex system which prevent downloading user programs. (4.09 only)
  • Updated CHM files and fixed issues in ROBOTC opening the wrong CHM file.
  • Update colors properly with the new document architecture with graphical.
  • EV3 – Casper update to prevent crashing when using VMWare Virtual Machines.
  • VEX IQ Graphical – Add USB ‘Directional Pad/POV Hat’ values for use with armControl with Virtual Worlds for IQ
  • VEX IQ Graphical – Added the ability for Graphical XML Documents to contain “RBC Macro” parameters.
  • Licensing system update to fix “heartbleed” like issues that may be present during activation.
  • EV3/IQ – Eliminate duplicate identical definitions in robotcintrinsics.c for motor commands.
  • Add new EV3 commands for sending I2C messages
  • Fix a bug in compiler generation of ‘string’ concatenation (i.e. “+”) operator.
  • Bug in code generation. Incorrect generation of opcode bytes for “opcdAssignGlobalSShort”; old format using 1-byte global index instead of new format with 2-bytes.
  • Update timeouts for VEX Cortex with new Master Firmware 4.22 for use with VEXnet 2.0 Radios.
  • Renamed DrawCircle to drawCircle
  • Fix Compiler bug with “%” and “>>” opcodes. Most of the “>>=”, “<<=”, “%=”, “&”=, “|=”, and “~=” opcodes don’t care whether the left-hand operand is ‘signed’ or ‘unsigned’. That’s how they were treated in current compiler / VM. However, “>>” and “%” opcodes do care if “signed’ vs ‘unsigned’ where the operand size is either ‘char’ or ‘short’. This change fixes that situation. This problem has been undetected since the introduction of ‘unsigned char’ and ‘unsigned short’ types were introduced.
  • 4WD Support for Natural Language with VEX IQ.
  • VEX IQ Graphical – Changes to “moveMotor” command to allow it to move in reverse if user specifies a negative quantity or speed, not just speed
  • VEX IQ Grahpical – Adjust the Graphical arcadeContorl and tankControl commands to only show channels; adjust armControl to only show buttons; add default values to most commands
  • Virtual Worlds – regulated motor movements for RVW;
  • VEX IQ – Fixed VEX IQ bug where I2C traffic would be considered “timed out” on VM startup.

As always, if you have questions or feedback, feel free to contact at support@robotc.net or visit our forums!

Written by Cara Friez

May 28th, 2014 at 8:12 pm

Student POV: Robovacuum

without comments

Alexis and Noah are back again with another Student POV! This time, sharing how they programmed a robovacuum in ROBOTC Graphical Language for the VEX IQ platform.

————————————————————————————
In this challenge, we programmed the Vex IQ robot to perform a task that was based off of the robotic vacuums that vacuum autonomously while avoiding obstacles. Our challenge was to program a robot that would perform like a robotic vacuum. Therefore it would be able to move autonomously while avoiding obstacles.

We started our program by putting in a repeat forever loop. This means that our program will continuously run until we stop it with the exit button on the Vex IQ brain.

RoboVacuum1

We then made a plan on what we needed our robot to do. Within the repeat loop, we had to put an “if else” statement. An if else statement is a command that makes a decision based on a condition. With our program, our condition is the bumper sensor. The robot checks the condition of whether or not the bumper sensor is depressed. If the bumper sensor is not depressed, it will run the command inside the curly braces of the if statement. If the bumper sensor is depressed, it will run the commands inside the brackets of the else statement. We had to put this statement inside a repeat forever loop because without it, it would only make this decision once.

RoboVacuum2

We then had to decide what task the robot was to perform when the sensor was depressed. So we set up commands within the curly braces of the else statement shown here.

RoboVacuum3

Below is an image of the final program.

RoboVacuum4

Now our robot is able to move around autonomously while avoiding different obstacles!

- Alexis and Noah

 
 

Robomatter Blog Ad VEX IQ

 

Written by Cara Friez

April 17th, 2014 at 8:30 am

Student POV: Slalom Challenge

without comments

It’s Danica and Jake, back again! This time, teaching people about the slalom challenge, in ROBOTC Graphical Language for the VEX IQ platform. The challenge is to line follow using the VEX IQ color sensor without hitting the “mines”, also known as the cups.

#5

In the graphical organizer, to line follow on the left side of the line, all you have to do is use the block, lineTrackLeft, to follow the right side you have to use lineTrackRight.

#1

In this block, there are 3 boxes, one for the threshold, the second for the speed of the left motor, and the last box is for the speed of the right motor. In this line of code, the threshold of 105, the robot’s left motor is set to go at 50% power, and the right motor is set to go at 15% power.

This block has to be included into a repeat loop to make sure the robot continues to do this command for an allotted amount of time.

#2

The repeatUntil loop has many options for how long the loop should run. For this challenge, we decided to use the timer.

#3

The timer is set at 7000 milliseconds or 7 seconds, so it has enough time to make it through the slalom. Our finished program looks like this:

#4

Now you can line follow in any challenge you would like, the possibilities are endless!

 
 

Robomatter Blog Ad VEX IQ

 

Written by Cara Friez

April 2nd, 2014 at 7:47 am

Student POV: Robo 500 Challenge

without comments

Hi, we’re Alexis and Noah, two eighth grade students at Hopewell Memorial Junior High School. Earlier this week, we did the Robo 500 challenge. To write the programs, we used the recently released ROBOTC Graphical software for the VEX IQ. The goal of the challenge was to complete two laps around a Vex IQ storage bin.

ROBO 500 picture

We completed the challenge by using timing and degree measurements. The first step was to get the robot to move forward. For this, we would use a basic motor command.

Photo 1

In ROBOTC Graphical, it gives you the option to choose the values in which you want your motor to run by, such as time and rotations. In this challenge, we chose time.

Photo 2

From there, we experimented with different time values until we found the timing that was needed to finish the side of the challenge before the turn. Through testing, I found that 3.7 seconds covered the distance needed.

Photo 3

Now, what was left was the largest challenge of the program, the turn. Timing a turn can be challenging on seconds alone. So, I used degree turns. I started with a 180 degree, which brought me around about 45°. Due to the drift of the robot when it moves forward, I had to make the turn slightly less than double the 180° turn. I settled on a value of 300°.

Photo 4

Once the values were established, the rest was just repeating the commands so the robot would go around the whole box. Here is an example of my final program.

Photo 5

We were then thinking about how the turns were a hassle with trial and error, and contemplated a better way to turn. So, we decided to use a gyro sensor to have the most accurate turns possible.

To start out the program we had to reset the gyro sensor so the sensor could record the degrees from zero.

Photo 6

From here we moved forward to the end of the course for time, and we moved forward for about four seconds. Then we used a while loop. A while loop is set to check a condition and while the condition is true, it performs what is inside of the curly braces of the while loop. In this case the condition is while the gyro sensor value is less than 90 degrees.

Photo 7

We would then repeat these actions until the robot has made two full laps around the course. Here is the program for one lap. To do two laps I would just repeat this program again.

Photo 8

We were able to finish our programs efficiently in a short amount of time due to the design of the new graphical programming. This new design enables you to drag over commands from the function library; such as, moving forwards and backwards, turning, and sensor commands while avoiding the hassle of painstakingly typing each command. This reduces the time spent on each program and allows us to speed up the pace at which we program, and we are able to complete challenges in a shorter amount of time.

Photo 9To the left, we have an image of the function library and a depiction of what would happen if you dragged a command into your program. The command would line up with the next available open line and would give you options as to what values you wanted to program your robot with.

————————————————————

If you’re a student who would like to contribute to the blog, let us know at socialmedia@robotc.net.

 
 

Robomatter Blog Ad VEX IQ

 

Written by Cara Friez

March 26th, 2014 at 7:30 am

Student POV: Labyrinth Challenge

without comments

We are really excited to introduce a new blog series called Student POV! This series will feature students giving their perspective and advice for programming in ROBOTC. If you’re a student who would like to contribute to the blog, let us know at socialmedia@robotc.net. Welcome our first student bloggers, Danica and Jake!

————————————————————
Hi it’s Danica and Jake, and we just completed the Labyrinth Challenge. We are both 8th grade students attending Hopewell Memorial Junior High. We both used VEX IQ Graphical Programming Language to complete this challenge since it is a new software recently released by ROBOTC. The first challenge we had to accomplish was the labyrinth challenge. The labyrinth is a square, where the robot has to travel from the starting point, to the ending point by doing a series of basic commands.

#1

Our first task was to make our robot move forward.

#2

This block is telling the robot to go forward at 50% power for 5 rotations, but you can also set the robot to move for degrees, milliseconds, seconds, and minutes.

Our second task was to make the robot turn left.

#3

When turning left, you can use multiple commands such as degrees, rotations, milliseconds, seconds, and minutes. You can also use this for turning right.

One problem while programming for this challenge was making 90 degree turns. To get a perfect 90 degree turn, with timing, you had to go through a lot of trial and error. After figuring out the perfect turns, based on timing, the time for moving forward, and the stops to prevent drifts, we had to string all the commands together to form the program for the challenge. This what the finished program looks like:

#4

An easier way to perform more accurate turns, is with the use of the gyro sensor. The gyro sensor allows you to count how many degrees you turn. This simply means that you can actually tell the robot to make an accurate turn. You also have to remember to reset the gyro after every use, and it will make this program a lot easier.

To reset the gyro you have to use this block:

#5

The finished program with the gyro sensor looks like this:

#6

In this program we used the setMotor command instead of turnLeft or turnRight. This command is better to use in the while loop since you only have to set the speed of the motor. The condition in the while loop determines how long the robot turns. As a result, we just need to set the motor speed with the setMotor command.

A cool feature you can use in RobotC is commenting out your code. You can also do this in the VEX IQ Graphical Organizer. It is much easier though since you only have to click the number on the block of code you want to comment out.

Commenting looks like this:

#7

These comments allow you to test only one turn out of the whole code, which is very useful during the trial and error stage.
Now it is time to go try the Labyrinth challenge on your own, either with or without the gyro sensor. Have fun!

 
 

Robomatter Blog Ad VEX IQ

 

Written by Cara Friez

March 19th, 2014 at 4:29 pm

A Teacher’s POV: Using the Gyro Sensor

with one comment

Programming your robot to make precise turns can be a source of frustration for some students as they begin to learn ROBOTC. Oftentimes, when students are just learning programming, all of the movements of their robots are based on timing. When programming a robot to move forward or backwards, a small error or a small amount of inconsistency can usually be overcome. With turning, however, inconsistencies and small errors can lead to larger errors and the frustration I mentioned earlier.

gyro sensor

At this point, students learn that sensors can be used to improve the movement of their robots. With the VEX IQ, a Gyro Sensor is provided that eliminates any guesswork when it comes to programming your robot to turn.

The Gyro Sensor measures the rotational angle of the robot. If you look at the Gyro Sensor, you will see an arrow that points in a counter-clockwise direction. That is the default positive direction. Therefore, as long as the sensor is mounted flat on the robot it picks up the parallel angle to the ground. The sensor then registers the current position as a zero point. If the robot turns counter-clockwise, it registers as a positive value. If it turns clockwise, the sensor registers a negative value. We can see this applied with the following illustration:

 

Gyro_Sensor--Display

 

We can program the Gyro Sensor using Natural Language or full ROBOTC. To use Natural Language, you just need to make sure that the Gyro Sensor is plugged into port 4. Let’s take a look at some ways to program the Gyro Sensor with Natural Language.

 

measure turnsleft gyro

 

With this program, getGyroDegrees returns the current rotational value of the sensor in units of degrees. When making gyro-based turns, it is best to reset the gyro sensor before each turn, so the resetGyro command is utilized. With the example, we want the robot to turn until the getGyroDegrees command returns a value (from the Gyro Sensor) of 90 degrees. Therefore, we use the repeatUntil command. When we run this program, our robot should make a 90 degree left turn. Note that the robot may turn more than 90 degrees due to drift, which is caused by momentum. If this occurs, just slow down the speed of the motors. That should eliminate the drift.

We can apply the same commands to program our robot to make a right turn.

 

measure turnsright gyro

 

What I did when first showing the students the Gyro Sensor was to have them see the sensor work with the debugger screen. I used a sample program utilizing full ROBOTC with this activity. The sample program we used was in the Gyro Sensor Folder, and it is called Gyro Display Values. The students compiled and downloaded the program. They kept the USB cables plugged into their robots so they could see the values of the Gyro Sensor on the debugger screen. To access the debugger windows, go to the Robot menu, click on Debugger Windows, and then select Sensors.

The students can now run their program, physically move their robot, and see how the values of the Gyro Sensor change via the debugger screen.

The VEX IQ Gyro Sensor is extremely useful and easy to program, and the students have a lot of fun using this sensor.

- Jason McKenna

 
 

Robomatter Blog Ad VEX IQ

 

Written by Cara Friez

February 24th, 2014 at 1:16 pm