Robot App Store

image description

Robopedia

LEGO NXT Cannot Play a Tone


Question


I am trying to play a tone using the PlayTone command (0x03).
I’ve checked the syntax of the command, and it seems correct.
What am I missing?

Answer


There are several possible reasons that the PlayTone commands are being ignored:
  • Wrong command arguments- The frequency and duration are constructed from 2 bytes each. Low byte should come first.
  • The volume on the NXT’s brick is set to 0;

In order to play a tone correctly, make sure that:
  • The volume in the NXT brick is set to more than 0;
  • The volume in the NXT brick is set to more than 0;
  • The frequency argument is at range of 200-1400 rounded, and its low byte is sent first;
  • The duration argument is represented as milliseconds, make sure its minimum value is 50, and its low byte is sent first;

For more information check the high-low bytes calculation at the Robopedia.

The syntax of the PlayTone command is:
[0x06] [0x00] [0x00 or 0x80] [0x03] [Frequency byte LSB] [Frequency byte MSB] [Duration byte LSB] [Duration byte MSB]

For more information about this command and its arguments check the How to make LEGO NXT to play a sound tutorial
married men cheat reasons people cheat how to cheat husband
all about abortion ru486 abortion pill cost misoprostol and abortion
transfer prescription coupon click cialis coupon



Related Robopedia portals

Find out further reading in the following topic-based portals.
[Add or Edit Article]