| Magic Byte | Index |
Since it is possible to change the address of a BrainStem module, it is necessary to have some way to determine its address. This is the function of the Magic Byte. The Magic Byte value is 173, or AD in hexadecimal. The "AD" is short for "address". Normally, an odd first byte in a command is interpreted as an invalid IIC address. However, the BrainStem will recognize an address of 173 received at the serial port and respond by transmitting a byte with its address.
To test the Magic Byte function, connect your BrainStem to the host computer and apply power. Run the Console program. Enter "173" or "0xAD" at the prompt. The Console will automatically transmit the Magic Byte followed by a 0 byte. The 0 byte means there is no addtional data in the outgoing packet. If the address of your module is 2, you should see the following:
Sending a Magic Byte packet is also handy as a quick check to see if a module is responding to serial input.