Create an ASK transmitter using an Arduino and an external ASK RF module.
For this sketch, I used this 433 MHz ASK transmitter. We are interested in the DATA, VCC, and GND pin. Connect the DATA pin to an analogue or digital pin on the Arduino board and set the TX_PIN constant accordingly. I also used one of the pins (set in the constant TX_VCC) on the Arduino to provide power to the RF module.
I highly recommend using URH to find out what 'bits' are sent by your ASK device (e.g. remote control) and related timing measurements.
- Identiy the preamble and data bits in URH and copy them over to the
preambleanddatavariables in the sketch. Count the number of bits for both and update the array lengths in the constantsPREAMBandBITS. - Set the duration of each bit (in microsends) in the constant
BIT_DURATION. - Set the delay (in microseconds) between the end of the last preamble bit to the beginning of the first data bit in the constant
PREAMB_DELAY. - Similarly, the constant
REPEAT_DELAYis how long your device waits (in microseconds) before repeating transmission (e.g. when the button on the remote is held down). - Connect everything up and power up the Arduino.