Initial version from https://github.com/arduino/Arduino/pull/2032
Allow no-transmit mode (using UINT8_MAX as transmitPin)