LEGO NXT Drums

NXT is a rhythm game where you play a sequence of beats on a LEGO drum kit with snare and bass drums and a cymbal. It was built using a single LEGO Mindstorms NXT 2.0 kit.

How to Play

In each level, a certain beat will be played repeatedly by the NXT. You will need to play the exact same beat correctly four times in a row using the drum kit. Simply start playing anytime. If you stop playing, after a while the NXT will resume playing the current beat, in case you need to refresh your memory.

The flag shows how many times you have played the current beat correctly. If the flag returns to the start position, it means you have played the beat incorrectly.

The most accurate you play the beat, the most points you will earn. If you manage to finish all 15 beats, your score may be added to the rankings if it is high enough. You can enter a 3-letter abbreviation of your name (like old-school arcades) so other persons can play and compare their scores.

Instruction and Program

First, get everything you need:

  1. Download program, source, instructions and resources
  2. Extract the zip file you have downloaded in the link above (if you need, check this help on uncompressing zip files in Windows 7).
  3. The files will be extracted to a folder name “nxtdrums”. All files are inside this folder.

Build the model:

  1. Open the Instructions.pdf file (you will need a PDF viewer such as Adobe Reader).
  2. Follow the instructions!

Download the program and resources to the NXT:

  1. Turn on your NXT and connect it to your PC using the USB cable.
  2. Open the LEGO MINDSTORMS NXT sofware.
  3. Near “Create new program”, click “Go >>”.
  4. Open the NXT window (click the upper left button above the “Play” button).
  5. Click on the “memory” tab.
  6. Click “Download”. Go to folder you have extracted in Step 2, select the first file and Click OK. Click “Download” again, select the second file, click OK, and so on for all files (sorry, I don’t know any easier way to do this). If you want to be sure, the following files need to be downloaded:
    • ! Applause.rso
    • bass.rso
    • cymbal.rso
    • Drums.rxe
    • font10v_arrows.ric
    • snare.rso
  7. In your NXT, go to “My Files”, “Software Files”, then “Drums”.
  8. Play!

NXT Drums does not work in very bright ambients (outdoors). If the bass drum is not working, try stopping the program (press the gray button), moving to a darker place (indoors with lights on is fine), and starting the program again.

To adjust the NXT Drums volume, adjust the volume of the NXT brick. Go to “Settings”, “Volume”, press the arrow buttons to adjust, and confirm.

The program is coded in NXC, you can use the Bricx Command Center if you want to make changes to the code. The source code is in the DrumsSource.nxc file.

Custom Mode

In custom mode, you can create your own beats to play in the NXT. Follow this steps:

  1. Edit the file nxtdrums.txt and insert your beats. The file is already filled with many example beats, you can edit them, or just leave them alone to test. Each beat is a line in the file, and the beat is described by the characters “.” (a rest), “B” (bass drum), “S” (snare drum) and “C” (cymbal). Each line should have at most 32 characters (“.”s do not count). Make sure there is an empty line after the last line.
  2. Download the nxtdrums.txt file to the NXT. Follow the steps above for downloading files to the NXT, but after you click “Download”, in the dialog you will need to choose “All Files” in the “Type” dropdown box. This will make the “nxtdrums.txt” file appear; select it and click OK.
  3. Start NXT Drums and select “Custom”.

Credits

This game was inspired by a mini game in Rhythm Tengoku. Bass drum sound by Minorr Grafitti Studio. Snare drum sound by KEVOY. Cymbal sound by irjames.

Posted in NXT | 23 Comments

“Gathering for Gardner” Dragon

"Gathering for Gardner" LEGO Dragon

There is a dragon paper model in the internet that is an example of a hollow-face illusion. You print it, fold it and you get an amazing optical illusion. When you walk around, the dragon head appears to be following you!

Then I had the idea of making the same dragon in LEGO. It’s not very pretty, since the back of a plate doesn’t look much like the front of a plate. But the illusion works! Check the video (sorry for the quality, I need a better camera :P):

httpv://www.youtube.com/watch?v=LIl1_pt4h7c

The illusion happens because our brains are used to convex faces, and when it sees a hollow one it interprets it as convex. This misinterpretation makes the face appear to move.

Posted in Misc | Leave a comment

Chu Totoro

My Neighbour Totoro is a popular anime film from Studio Ghibli. This is my attempt on building a Chu Totoro — the smaller, blue one.

LEGO Chu Totoro (front)

More photos in the Flickr gallery.

Posted in Misc | Tagged , , | Leave a comment

LEGO NXT Duel

The NXT Duel is a game that tests your reflexes, entirely built with a NXT 2.0 kit. Play against other person, or play by yourself beating the computer challenges.

How to play

Whoever shoots first after the bell rings wins. Watch out for distractions, like the crows squawking — if you shoot too early, you’ll lose.

During the round, an orange flag will rise. Its purpose is to create tension since the bell is guaranteed to ring sometime before it fully rises.

Single player mode

In single player mode, you’ll need to beat the 9 computer challenges: after the bell rings, you must shoot within the number of milliseconds specified in the round. In the first round, you’ll have 500 ms — that’s actually plenty of time! In the last challenge, though, you’ll be at the edge of standard human reflex times :)

The record number of tries that you take to complete all challenges is recorded. Can you do it in only 9 rounds, without a single miss?

In this mode, use the gun with the grey handle.

Two player mode

It’s simple: whoever shoots first, wins! You can select the number of rounds you need to win in order to win the game. The response time of the round winner is shown on the screen.

Instruction and Program

First, get everything you need:

  1. Download program, source, LDD model and resources
  2. Extract the zip file (check this if you need help)

Buliding the model:

  1. If you don’t have LEGO Digital Designer, download and install it.
  2. Double click the duel.lxf file in the folder you have extracted.
  3. After the file opens in LEGO Digital Designer, press F7 and follow the instructions to build the model.

Downloading the program and files to the NXT:

  1. Turn on your NXT and connect it to your PC using the USB cable.
  2. Open the LEGO MINDSTORMS NXT sofware.
  3. Near “Create new program”, click “Go >>”.
  4. Open the NXT window (click the upper left button above the “Play” button.
  5. Click on the “memory” tab.
  6. Click “Download”. Go to folder you have extracted in Step 2, select the first file and Click OK. Click “Download” again, select the second file, click OK, and so on for all files (sorry, I don’t know any easier way to do this).
  7. In your NXT, go to “My Files”, “Software Files”, then “Duel”.
  8. Play!

The program is coded in NXC, you can use the Bricx Command Center if you want to make changes to the code.

Fun Facts About Reaction Time

There is some interesting research on reaction time; check this literature review. Some highlights:

  • Reaction time for sound stimuli is smaller than for visual stimuli; 160 ms vs 190 ms on average. (These are simple reaction times. Since there are distractions in the NXT Duel, your response time will be slower.)
  • Your reaction time get worse if you’re too relaxed or too tense.
  • Your reaction time is faster during expiration.
  • Your reaction time is faster with your left hand if you are right-handed, and vice-versa.
Posted in NXT | Tagged , , | 90 Comments