Tutorial: Segway IQ

segwayiq-small

The VEX IQ robotics kit comes with several cool sensors, including a gyroscope. Perhaps not surprisingly, I wondered if it could be used to create a self balancing robot. And it can!

I’ve provided the program and building instructions below so you can build your own balancing robot. You can build it with the basic kit (either the starter kit with sensors or the Super Kit), and you’ll need RobotC for VEX to run the program.

Video

Program

You can download the RobotC program here. Instructions to run the code are included. If you have any problems running the code, please ask your questions by creating a new “issue” on this page.

Building Instructions

Follow the steps below to build the robot. Click the pictures to enlarge.

01

02

03

04

06

07

08

09

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

Connect the motor on the left in this picture to port 4 on the VEX IQ brain. Connect the motor on the right in this picture to port 10.

44

45

46

Connect the Gyro sensor to port 5 on the VEX IQ brain. Connect the Touch LED to port 11.

47

Connect the Ultrasonic sensor to port 12 on the VEX IQ brain. Your robot is now complete.

25 Responses
    1. Both are nice robotics kits, actually. The LEGO elements are a bit more refined, allowing you to build smaller and more sturdy structures with a wide variety of other LEGO Technic parts, but the VEX IQ kit comes with more motors and sensors in the base kit.

      The RobotC programming language (non-free) is available for both platforms. The LEGO EV3 also comes with easy to use and free drag and drop software, and it can be programmed in a wide variety of other languages.

      Depending on the software options you go for, the total price (set + software) is comparable for both robotics kits.

  1. Ray

    To fix the problems mentioned above (I had the same ones). I made sure that the components had current firmware (they did). Then I totally Reset all Settings on the brain.

  2. Lee

    This is great! I just built this, and ran the code- the robot just moves backwards at full power no matter which angle the robot is leaning. All firmware and sensors are updated, and I tried 2 different gyros. Any advice? Thanks!

  3. I have same problem as Lee:
    This is great! I just built this, and ran the code- the robot just moves backwards at full power no matter which angle the robot is leaning. All firmware and sensors are updated, and I tried 2 different gyros. Any advice? Thanks!

  4. Cheri Haggard

    This is so great. Thanks for sharing. Our kids built it, tested it, did some troubleshooting of the code, found they had the gyro in the wrong port, fixed it. Very exciting to have this working!

    Now, how do we get the steering from the controller to work? When we try to drive it, it goes forward and falls on his face. Do we need to adjust something in the code?

Leave a Reply to Tony Nguyen Cancel Reply

Discover LEGO MINDSTORMS EV3

EV3 Discovery

Discover the many features of the EV3 set, and learn to build and program your own robots! Learn more

Start Building Robots

ev3set

Website Maintenance

Robotsquare is currently being updated, which means that it may look a little different (and not very polished) for a while. All the content and pages should still be there, though. It should be back and fully operational soon. Thanks for your patience!