Presentation is loading. Please wait.

Presentation is loading. Please wait.

An Introduction to VEX IQ Programming with Modkit

Similar presentations


Presentation on theme: "An Introduction to VEX IQ Programming with Modkit"— Presentation transcript:

1 An Introduction to VEX IQ Programming with Modkit
Robotics Lesson Materials: VEX IQ sensor car (per 2 students) Computer running Modkit (per 2 students) An Introduction to VEX IQ Programming with Modkit Lesson 02

2 Google Car Re-introduce concept of Google car in action. Compare with our car so far. Today: visual feedback for user (like reversing light on real car)

3 Assembling The Robot Assemble your robot: use drivetrain and Touch LED only. (Make sure to guide students to choose the right ports)

4 Programming our robot Program: moving forward and back (using distance or time it) with LED colour feedback. Have a look and discuss other drivetrain blocks (such as turns).

5 Programming a loop: brief
Challenge You need to program the robot to…. Make our car drive forward with a green light after 3 seconds make it go back with a white light 3 seconds later make it turn right with a red light Wait 1 second, then repeat all the instructions twice Introduce different types of loops/repeat structures (repeat / forever blocks). Guide students to create this program brief.

6 Programming a loop Only the brain section with the loop is shown here. The other routines have been built previously (or are simple adjustments).

7 Debugging a program: brief
Challenge You need to program the robot to…. Make the LED glow blue to signal the program is starting. Drive forward 100mm and back again 4 times, wait 2 seconds in between movements. Make the LED glow green when going forward and white when going back. At the end of the program make the LED glow red for 3 seconds, then switch it off. Hand out program (or download for students) with mistake, explain what you want the program to do.

8 Debugging a program Ask students what will happen when program runs. Run the program to see. Find the mistake (the bug) and fix it (debugging). Solution: lights need to be switched on in the GETREADY routine, the loop in the brain needs adjusting (DRIVEBACK should be in the loop) The light needs to be switched off after 3 seconds at the end of the program.

9 Summary Today you have: Learned to add the Touch LED to you robot.
Learning objective: Learn to program a VEX IQ robot with drivetrain and Touch LED sensor. Learn about repeat structures and debugging. Today you have: Learned to add the Touch LED to you robot. Programmed a robot to work autonomously. Learned how to use repeat structures. Learned to debug an algorithm.


Download ppt "An Introduction to VEX IQ Programming with Modkit"

Similar presentations


Ads by Google