Tuesday, July 13, 2010

Data wires carry information between programming blocks. Many blocks require that a data wire be attached if the blocks are to function at all. For example, the output from a Random block can only be sent out via a data wire.

Opening data hubs and creating data wires

You create a data wire by “drawing it out” of a block’s data hub. Nearly all of the programming blocks have data hubs and can support data wires.

Open a block’s data hub by clicking the tab at the lower left edge of the block after it has been placed on the work area.

Image showing two blocks side-by-side: one with an unopened data hub (with the tab surrounded with a colored rectangle), the other block with an open data hub (with a mouse pointer shown drawing out a data wire)

Note: Sometimes data hubs will not open completely, leaving some plugs hidden. Reveal all of a data hub’s plugs by clicking again on the tab area (as shown in the left image above). You can also close a data hub (or hide any unused plugs not connected to data wires) by clicking the tab area. This will help clean up your work area.

Drawing out a data wire

The cursor will change shape when it hovers over or is near a data plug. If you then press the mouse button and drag to the right, a data wire will “unroll” that can be connected to a plug on another block’s data hub.

Deleting a data wire

To delete a data wire that stretches from left to right between two data plugs, click on the right plug.

Input and output

Data wires carrying information to a block (i.e., carrying input) are connected to the plugs on the left side of its data hub. Data wires carrying information away from a block to another block (i.e., carrying output) are connected to the plugs on the right side.

Image of data wires

[A] Input plug
[B] Output plug
[C] Number data wire (yellow)
[D] Logic data wire (green)
[E] Text data wire (orange)
[F] Broken data wire (gray)

Data wires carry specific types of data

Each data wire carries a specific type of data between blocks. For example, if a data wire is dragged from a logic plug on a block’s data hub, it can only be connected to a logic plug on another block’s data hub.

Data wire colors

Data wires are identified with specific colors:

  • wires carrying number data are colored yellow
  • wires carrying logic (true/false) data are colored green
  • wires carrying text data are colored orange.

Broken data wires

If you try to connect a data wire to a plug of the wrong data type, the data wire will be “broken” and colored gray. You will not be able to download your program if it contains broken data wires.

If you click on a broken wire you can read why it is broken in the small help window at the lower right corner of the work area.

Image of the little help window.

Data must be within the possible range of the plug

If an input data wire transmits a value outside the possible range of the plug it is connected to, the block will either ignore the value or change it to a value within its range. For plugs that allow just a few input values (example: just 0, 1, or 2), the plug will ignore the input if a value arrives outside its range.

For plugs that accept larger input ranges (example: 0 – 100), the plug will force any input outside its range to fit. For example, if a Move block’s Power plug receives an input value of 150, the block will change the input value to 100 (i.e., a number within the Power plug’s range).

Passing data from the input plug to the output plug

Image of two input/output pairs of plugs – show the first with both logic input and output wires; show the second with only a gray output wire; show some indication that the first example is okay and the second if is not

If an input plug has a corresponding output plug, the input data will pass through from the input plug to the output plug without being changed. In this case, you can only use the output plug if the input plug is connected to an input data wire; connecting an output data wire to such an output plug without a connected input data wire will cause the output data wire to be “broken” and colored gray.

Data Hub chart

The Help file for each programming block contains a chart that shows the different characteristics of the plugs on the block’s data hub. For example, the chart for the Keep Alive block looks like this:

PlugData TypePossible RangeWhat the Values MeanThis Plug is Ignored When...
PortTime until sleepNumber0 - 4294967296Time in milliseconds until the NXT goes to sleep

Thursday, August 6, 2009

Modul Pembelajaran Terengganu Set 1 Bhgn A&B

ni la ms nak gasak bdk2 ngan soalan2.... gasak je... xpe pas UPSR korang nk main, main lh sepuas hati... cikgu xmarah dh




TRIAL UPSR 2009 MELAKA

Sekolah baru je abis trial... Lambat sket dr negeri2 lain. Tengah cari tial negeri2 lain, harap member yang ada jgn la kedekut sgt :-)... kongsi2 la dgn kwn2..


TRIAL UPSR MELAKA












Wednesday, August 5, 2009

Peka - Food Preservation

Peka - Food Preservation



Peka Speed in a Given Distance

Peka Speed in a Given Distance



Practical Science Assessment (PEKA) Year 6

Practical Science Assessment (PEKA) Year 6



Quiz Science Year 6 2008

Quiz Science Year 6 2008