Icon of block

Prototype Digital Read Block

This block reads the Prototype Board Digital input port and allows testing of each bit and sets an output boolean when the required state is read. The block configuration lets you test for any combination of the six digital inputs. .

The six

You must drag at least one output data wire from this block's data hub to another block for any information to be sent.

Display Settings

Image of block

  1. The number shows which of your NXT's ports are connected to the prototype sensor. You can change this number in the configuration panel if you need to.
  2. The block's data hub will open automatically when the block is placed in the work area. At least one data wire must be dragged from the block's output plug to another block's data hub. The analog channel and other features can be set dynamically by connecting an input data wire. (See the Data Hub section below for more information.)

Configuring the Prototype Sensor Block

Image of configuration panel

  1. Port:  Choose the port where your compass sensor is plugged in. By default, the block will be set to port 1 for the prototype sensor. You can change this selection if you need to.
  2. Compare: Select the desired combination of the Porototype Digital inputs that will be combined to create the overall required logic output.
    Each bit can be selected as True (1), False (0) or Ignore (don't care).  When the state of all digital bits matches the combination set in the Compare Table, the block output logic state will be set to True, otherwise it will be Fales. 

    For example, with the setting shown in the front panel above, the overall logic output will be set to True when

    B0 is True
    and
    B1 is True
    and
    B3 is False
    All other bits are ignored

Prototype Digital Read block Data Hub plugs

You must click on the Data Hub to open it as shown.

Image of block

 

 

 

 

 

 

 

 

 

 

 

  1. This plug wires the number for which of your NXT's ports are connected to the prototype sensor.
  2. This plug wires the compare selection for B0, 0=True, 1=False. 2=Ignore.
  3. This plug wires the compare selection for B1, 0=True, 1=False. 2=Ignore.
  4. This plug wires the compare selection for B2, 0=True, 1=False. 2=Ignore.
  5. This plug wires the compare selection for B3, 0=True, 1=False. 2=Ignore.
  6. This plug wires the compare selection for B4, 0=True, 1=False. 2=Ignore.
  7. This plug wires the compare selection for B5, 0=True, 1=False. 2=Ignore.
  8. This plug wires the digital value from the read.
  9. Boolean result of the overall compare table, True or False. (Yes / No)

The prototype digital bits will be read as a value in the range 0 - 63.

Each digital port bit has a binary value as follows;

Bit Value
B0 1
B1 2
B2 4
B3 8
B4 16
B5 32