Interfacing H34A 315/433MHz RF Transmitter Module with Arduino

H34A Wireless Transmitter Module Features

Electronic devices need to be connected wirelessly in so many cases. In such cases, Radio Frequency or RF equipments are used. RF modules include all radio waves that can travel different distances and reach the receiver according to their frequency and amplitude.

The H34A module is produced in two different types: 315MHz and 433MHz.


All modules that use the 315/433MHz frequency band can communicate with each other and there is no information security in this type of communication. If you need security, you must use encryption (locking) on the receiver and transmitter.


This module is only a transmitter and cannot receive data. So, on the receiver side, we use one type of radio receiver according to the transmitter frequency.

H34A Wireless Transmitter Module Pinout

This module has 4 pins:

  • VIN: Module power supply
  • GND: Ground
  • Data: Data line for sending or transmitting
  • ANT: Antenna (connection is optional)

Required Materials

Hardware Components

Arduino UNO R3 × 1
H34A 433Mhz Transmitter Module × 1
H34A 315Mhz Transmitter Module × 1
Male to Female Jumper Wire × 1

Software Apps

Arduino IDE

Interfacing H34A Wireless Transmitter Module with Arduino

Step 1: Circuit

The following circuit shows how you should connect  the Arduino Board to the H34A module. Connect wires accordingly.

Step 2: Library

Install the following library on your Arduino IDE.


If you need more help with installing a library on Arduino, read this tutorial: How to Install an Arduino Library

Step 3: Code

Upload the following code to your Arduino.

  Example for different sending methods

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {

  // Transmitter is connected to Arduino Pin #10  
  // Optional set protocol (default is 1, will work for most outlets)
  // mySwitch.setProtocol(2);

  // Optional set pulse length.
  // mySwitch.setPulseLength(320);
  // Optional set number of transmission repetitions.
  // mySwitch.setRepeatTransmit(15);

void loop() {

  /* See Example: TypeA_WithDIPSwitches */
  mySwitch.switchOn("11111", "00010");
  mySwitch.switchOff("11111", "00010");

  /* Same switch as above, but using decimal code */
  mySwitch.send(5393, 24);
  mySwitch.send(5396, 24);

  /* Same switch as above, but using binary code */

  /* Same switch as above, but tri-state code */ 


This code is to test the connection between the transmitter and receiver.

The receiver can see the sent data in the Serial monitor.

Liked What You See?​
Get Updates And Learn From The Best​

Comments (2)

  • Jesus Dominguez Reply

    I am introducing in the knowledge of Arduino and its applications.

    January 6, 2022 at 10:55 pm
    • Mehran Maleki Reply

      That’s great to hear! Good luck.

      January 8, 2022 at 7:19 am

Leave a Reply

Your email address will not be published. Required fields are marked *