user70534: Folks,
There is a document named "Complete Guide for RF 433MHz Transmitter.pdf" available in the GitHub.
There is a a connection diagram showing the Data pin of the Transmitter connected to the pin 12 of the Arduino Uno.
The Transmitter sketch given in it is as follows:
#include <RH_ASK.h>
#include <SPI.h> // Not actually used but needed to compile

RH_ASK driver;

void setup()
{
 Serial.begin(9600); // Debugging only
 if (!driver.init())
 Serial.println("init failed");
}

void loop()
{
 const char *msg = "Hello World!";
 driver.send((uint8_t *)msg, strlen(msg));
 driver.waitPacketSent();
 delay(1000);
}

There is no mention of Pin 12 as part of the sketch. I am not sure how the Arduino knows the Transmitter Data input is connected to the Pin 12? Can someone please help?
Ranjith

user70020: In RH_ASK.h is:
RH_ASK(uint16_t speed = 2000, uint8_t rxPin = 11, uint8_t txPin = 12, uint8_t pttPin = 10, bool pttInverted = false);

So the argument has a default value specified here.  If you don't specify it, it assumes that default.

70534: <p>Folks,</p>
<p>There is a document named &quot;<a href="http://www.energiazero.org/arduino_sensori/Complete%20Guide%20for%20RF%20433MHz%20Transmitter.pdf" rel="nofollow noreferrer">Complete Guide for RF 433MHz Transmitter.pdf</a>&quot; available in the GitHub.</p>
<p>There is a a connection diagram showing the Data pin of the Transmitter connected to the pin 12 of the Arduino Uno.</p>
<p>The Transmitter sketch given in it is as follows:</p>
<pre class="lang-cpp prettyprint-override"><code>#include &lt;RH_ASK.h&gt;
#include &lt;SPI.h&gt; // Not actually used but needed to compile

RH_ASK driver;

void setup()
{
 Serial.begin(9600); // Debugging only
 if (!driver.init())
 Serial.println(&quot;init failed&quot;);
}

void loop()
{
 const char *msg = &quot;Hello World!&quot;;
 driver.send((uint8_t *)msg, strlen(msg));
 driver.waitPacketSent();
 delay(1000);
}
</code></pre>
<p>There is no mention of Pin 12 as part of the sketch. I am not sure how the Arduino knows the Transmitter Data input is connected to the Pin 12? Can someone please help?</p>
<p>Ranjith</p>
 70020: <p>In <a href="http://www.airspayce.com/mikem/arduino/RadioHead/RH__ASK_8h_source.html#l00278" rel="nofollow noreferrer">RH_ASK.h</a> is:</p>
<pre class="lang-cpp prettyprint-override"><code>RH_ASK(uint16_t speed = 2000, uint8_t rxPin = 11, uint8_t txPin = 12, uint8_t pttPin = 10, bool pttInverted = false);
</code></pre>
<p>So the argument has a <a href="https://en.cppreference.com/w/cpp/language/default_arguments" rel="nofollow noreferrer">default value</a> specified here.  If you don't specify it, it assumes that default.</p>
