- Home
- About
-
- 3-Metre Dash
- Arduino + NXTMMX + LEGO Motors
- Using the Enchanting Source Image
- Books In The Library
- Jumpstart Guide to Using Enchanting with Bazaar Version Control
- Hacking On Scratch
- Create your own printable LEGO Grids
- LEGO and DUPLO printable grids
- Behaviour-Based Wall Follower in NXT-G
- Robofest 2010 in Cardston
- Blog
- Contact Us
- Courses
- Events
3-Metre Dash
The 3-metre Dash is drag racing with a twist. Your robot needs to cross the finish line as quickly as possible without crossing the disqualification line. The distance from the starting line to the finish line is 3.02 m, and from the finish line to the disqualification line is 0.84 m.

Rules
- One or more robots will be placed completely behind the starting line.
- There will be a timer watching each robot.
- The chief timer will say, “On your marks, get set, go!” and timers will start.
- Roboticists will start their robots, either by hand or with a signal, such as a sound or a light.
- The timer watching each robot will stop the timer as soon as any part of the robot is over the finish line.
- If any part of the robot goes over the disqualification line, it is disqualified and the time is not counted.
- Robots will not be touched until the judge determines if the run counts or not.
- In the event of a false start, the match will be re-run.
- Each robot has two opportunities to dash, and its best time (that was not disqualified) will be recorded.
Hints
- Build a robot that goes straight. A longer robot, with wheels farther apart will usually go straighter.
- Experiment with different wheels and gears.
- Make your robot as light as possible.
- Have fresh batteries
- You may need to start braking (or reversing!) before you even get to the finish line.
Arduino + NXTMMX + LEGO Motors
Updated 2010-11-09. It is not much easier to install the library.
When I first learned that Mindsensors.com (who make several really neat sensors for use with the NXT) was making a motor multiplexer, I contacted them to ask if it would work with the Arduino (yes!) … and then I asked if I could buy a prototype and was thrilled when they sent me one. (Thanks!)
This video shows how well it works.
Oh man. I love the NXT, but I really like the possibilities that this affords. The NXTMMX allows you to connect two LEGO motors to a device that issues I2C commands, and gives you one more port to plug in another NXT device. There is a good tech spec documenting the commands, so there is no reason it wouldn’t work with your microcontroller of choice, by merely connecting four wires (with a cable like this, or something from here) and supplying power with a battery pack.
Better than that, though, is that there are other I2C sensors for the NXT which will work. When I run the I2CScanner example sketch, I am able to see a HiTechnic Compass Sensor and a Mindsensor’s Line Leader. Most of my other sensors do not use the I2C bus to communicate and would need to be connected differently to use with an Arduino. [For anyone who wants to try, allow me to recommend Extreme NXT: Extending the LEGO MINDSTORMS NXT to the Next Level, or download the NXT Hardware Development Kit — LEGO was kind and wise enough to offer schematics on how the parts works.] One I2C sensor that did not work was LEGO’s Ultrasonic sensor. I suspect that if I provided a 9V power signal to it, it would work.
I have started an open-source project called NXT I2C Devices for Arduino. The project contains my initial code to run the NXTMMX (ported from the Not eXactly C API for the device), and, Mindsensors has been contributing code so you can use it with other sensors that they sell!
Update: To use it, create a directory called libraries within your Arduino sketchbook directory. Then, download and extract the latest version of NXTI2CDevice into that folder. (You should end up with a /libraries/NXTI2Device folder within your sketchbook.) Quit and restart the Arduino IDE, and you are ready to go!
If you’d like to aid in development, you’ll need to install the Bazaar version control system to get the latest code. At a command prompt, change to the Arduino library directory (on my Mac it is /Applications/Arduino.app/Contents/Resources/Java/libraries/), and issue this command:
bzr branch lp:nxti2cdevice NXTI2CDevice
If you’d prefer to use a graphical tool, take a look at the first few steps of my previous post explaining the use of Bazaar Explorer with Enchanting. Just make a branch of lp:nxti2cdevice, and then copy/move/symlink the folder into your Arduino libraries folder.
Oh, and if you are interested in helping out on the project, drop me a line.
Happy Hacking!
Using the Enchanting Source Image
The instructions to use the Enchanting source image are now here.