Aug 26, 2008

NXT Echo Telegraph

Tap out any rhythm on this simple NXT Echo Telegraph, and the NXT will answer you by playing back your exact rhythm with the NXT's speaker, as if a distant friend on the other end of the line was answering and repeating you. The program demonstrates use of the File Access block to store the rhythm timing data in a file and then reads it back out to repeat your rhythm.

While writing the program for this project, I discovered a neat little NXT-G trick. You know how you can't wire a value into a Time Wait block in an attempt to specify how long to wait (because the Wait block has no data hub)? Well, instead of using a loop and a timer to do a value-based time wait, you can use a single Sound block to play a tone with the time value wired into the Duration, Volume set to zero, and Wait for Completion checked, thus producing a silent delay of the requested time with just one block.

2 comments:

Rick Rhodes said...

Looks awesome, Dave.

Can the robot repeat taps at a high rate of speed; that is, can it reproduce a fastly-tapped rhythm?

Dave Parker said...

Yes, it can repeat taps as fast as you can tap them. That is, the limiting factor is how fast your fingers are...

Related Posts Plugin for WordPress, Blogger...