RedstoneChips

transmitter

Broadcasts its data inputs wirelessly over a specific broadcast channel. The data can be received by any receiver chip tuned to the same channel.

Set your message in the input data pins, then set the send pin (input 0) on, to send the message. If the send pin is left in an on state, the transmitter will send data whenever any of the input data pins changes state. A transmitter with one input pin doesn’t have a send pin and will send a message whenever that input changes state.

The channel name can specify a start bit by using the format: <channel name>:<start bit>. When used, the transmitter will set the broadcast channel data from the start bit on leaving the current value of channel bits that are out of range.

Using the optional select(<# ranges>) argument allows a single transmitter to send to multiple ranges of bits on the channel. Using this option requires enough additional input pins to represent the number of ranges, 1 for 2 ranges, 2 for 4 ranges, 4 for 16 ranges, etc. These additional pins will be right after the send pin. Data transmitted will be directed to a starting bit equal to the range selected * the number of data bits. For example, with an 8 bit transmitter and select(3), 0 on the select pins will transmit to bits 0-7, 1 will transmit to bits 8-15, 2 will transmit to bits 16-23. This setting is in addition to any start bit specified in the channel identifier. Using the above example again, if the channel identifier specified bit 10 as the start bit, 0 on the select pins will transmit to bits 10-17, 1 will transmit to bits 18-25, 2 will transmit to bits 26-33.

source code


I/O setup

Sign text

  1. transmitter
  2. <broadcast channel>[:<start bit>] (NOT optional) (The channel name is not optional)
  3. select(<select length>) (optional)

transmitter/receiver pair

Version history: Added to BasicCircuits 0.1

Fork me on GitHub