Near Field Communication 2

If you liked this item, please rate it up on Steam Workshop page.

Author: Dominik Korsa

Last revision: 7 Oct, 2020 at 19:16 UTC

File size: 97.5 MB

On Steam Workshop

Description:

This mod makes it possible for your creations wirelessly!

Example use cases:
  • Train signalling
  • Remote garage door openers
  • Distance detection
  • Remote control
  • Road signs/traffic lights
  • Object identification

Usage tutorial

Note: some functions require the usage of number logic avalible in The Modpack.

There are two parts in this mod: The NFC Antenna Block and NFC Data Block.


There are three modes of the Antenna Block. You can cycle using E (use Ctrl+E to cycle backward).

  • A+B – connects with all modes (A, B, and A+B)
  • A – connects only with B and A+B
  • B – connects only with A and A+B

Every antenna will try to connect with the closest antenna to it, which has the same color and channel (0 by default). When an antenna is connected, its screen turns blue.


To send and receive data, as well as to control the antenna, use the Data block. First, connect it to an antenna (some modes allow connecting it to multiple antennas), and after doing that, select one of the following modes:

  • Input – used to send logic or number values. Paint it with different colors to send multiple values.
  • Output – used to receive values send by same-colored inputs in the connected antenna.
  • Always enabled (constant) input – sends a 1 (enabled) value.
  • Set range – used to set the maximum connection distance (in blocks) of an antenna.
  • Set antenna enabled – enabled the antenna with a 1 (enabled) input and disables it with a 0 (disabled) input. A disabled antenna doesn’t try to connect with other antennas. The antenna is enabled by default.
  • Set channel – used to set the connection channel of the antenna (0 by default). An antenna will only connect with other antennas on the same channel and of the same color.
  • Get distance squared – outputs the square of the distance (in blocks) to the connected antenna or 0 if there is no active connection. Use Modpack’s math block square root function to get the distance. For comparisons, it’s better to compare the distance squares instead of the distances themselves.
  • Get connection active – outputs 1 (enabled) if the antenna is connected with another one, or 0 (disabled) otherwise.