Arduino Integer Transmission Simplified





Introduction: Arduino Integer Transmission Simplified

This tutorial is all about the cheap Chinese data radios that is available on Ebay , during the past few years I have read and tried many libraries with these devices, and with mixed success on some and bad on others.

In this tutorial we will be looking at the most simplest Arduino Sketch to get a integer( only whole number no floats!) from point A to point B with definitions on how to increase your range and reliability.

Step 1: Setting Up

First off we need the hardware get your self a set( RX and Tx ) of the cheap chinese data radios of Ebay or preferred supplier.Secondly you will need two Arduino boards, Mega 2560 or a Uno will do fine its your choice.

Once you have your hardware you need to make an antenna for your Rx and TX radios.

Step 2: Antenna's and Connections.

On the Antenna port you can attach a copper wire of 164mm in length (tested for best performance ) this wire can be solid wire or soft braided strand both work very well. once you have the Antenna's attached it is time to connect your radios with the Arduino's.

On the TX side( the small PCB is the TX unit)

Pin VCC => 5v

Pin DATA => 11

Pin GND => GND

On the TX side( the Larger PCB is the RX unit)
Pin VCC => 5v

Pin DATA => 11 (Any of the middle two pins)

Pin GND => GND

Now you are ready to load the code.

Step 3: Installing the Library and Running the Code.

Once you have the connections made you are ready for the Code ! IF you do not have the Virtual Wire library installed then here is what to do.

Attached is a file called "" extract this file and copy content in the file directory below.

"C:\Program Files\Arduino\libraries"

Now you are ready for the code! start up two instances of the Arduino IDE and load the to files attached called

RX_STRIPPED and TX_STRIPPED into each IDE and upload into your Arduino boards( Make sure that your TX code is installed on the Arduino with the TX unit attached and the same for the RX unit.

Once uploaded start your serial monitor and you should start seeing data flowing from the TX to the RX Serial monitor.

Whala! your done ! now its time to get your head working and changing the code to do what you want !

Hope this helped !

Step 4: Factors That Decrease/Increase Range

Okay so your Radios are working and now now you want the maximum range yes?

Okay well here is a list of steps to take to get maximum range.

Step 1 ) Decrease baud rate that the radios work at to between 1000 and 2000bps

Step 2) Make the packet(payload) size to be sent smaller

Step 3) Increase the input voltage on the Transmitter to between 7.2 and 12v (7.2 works best for me )

Step 4) Make your antenna's of a higher quality wire and try to stay with in line of site.

I have personally with this code and settings above achieved 110 meter reliable communications with these units.



  • Creative Misuse Contest

    Creative Misuse Contest
  • Oil Contest

    Oil Contest
  • Clocks Contest

    Clocks Contest

24 Discussions

i got only mid value of transmitter . what should i do?


For me is not working, and the RX-TX pair is functional, tested with another sketch.

What I want, is to send the data over wireless from 4 inputs, and activate 4 outputs on the receiver, one for each input, but can't get them working.

Any tips would be appreciated.

could you tell us more about your antenna? I soldered a 17cm copper wire to both the RX and TX, but i can't seem to get more than a meter of range between them, before the signal dies

Do you have any trouble with this library and the LCD5110_Graph.h or LCD5110_Basic.h library?

The VirtualWire and the Servo libraries don't work together but apparently RadioHead does, can you make for that one or explain how to? Thanks

Nice project!

I am worried about the range. I tried many wireless bells at home and none of them has an acceptable range.

You say that increasing the input voltage will increase the range, but how can you do that?


2 replies

the transmitter has a operating range of 3v- 12v on the VCC pin , but i found powering it with 7v works best for range.

I understand that, but afaik the Arduino only has 5 V and 3.3 V pins. How can you power the transmitter at 7 V or even 12 V without damaging the Arduino?

Sorry, maybe a silly question, but I am a newbie and I never used an Arduino before (never made an electronic DIY project, actually) and I'd really like to try this one (or similar projects with 433 MHz transmitters).

I am running my No.1 Arduino with the Transmitter module on battery. My No.2 Arduino is connected to my Receiver module and that is connected to the IDE running my Serial Monitor. I have NO data flowing or any communications from what I can tell. I verified the correct baud rate for the serial monitor and the sketch is the same. This is my second set I ordered from China and was hoping this set would work. I am wondering at this point what stupid thing that I did on my end. Do I have to have two serial monitors up for both Arduinos for this to work? Is there some way to test if it is transmitting? Thank you, humbley ... JOE

2 replies

i am not sure from what i see in the source code of the receiver , their is no assignment for the received data to variable aka , what i beleive (i may be wrong) , receivedData.Sensor1Data will remain 0 .

Hi Joe

Open Serial monitor on both sides the TX side will show what is being transmitted, if it does not show anything then the transmitter is not working, make sure your Serial monitors is set to 9600 baud


Vw_setup war no declared in this scope ??

vw_setup(2000);[color=#7E7E7E]// Setup and Begin communication over the radios at 2000bps( MIN Speed is 1000bps MAX 4000bps)[/color]


Hello Rustie

I'm working on a project that involves sending float values, and you mention in a response to msjuck that these radios are not powerful enough to send float data types. My question is why these particular RF units can't send float values, and what path would you recommend to send float values via radio transmission. Thank you very much for your time and patience.


2 replies

Hi Archerbob

The radios as far as I understand can not send "."or" ," separated values .I have read that people use a index to send float numbers for example . if value is between 1-2 then send 1 on the receiver side if 1 is received it is equal to between 1-2 . if that makes sense. but look online there are a few ways of converting floats into int and convert them back again

Thank you very much for the reply, I'll take a look into converting the values, as I'm trying to send GPS positions. On a related note, would a transceiver be able to send a "." or "," character (approximately similar quality and price as the radio units that you used)? I suppose the root of my question comes down to what type of radio can send the above-mentioned characters?

i have a question, Does it work without any kinda MCU, i mean something like direct Mic input.. I set 5v on Tx Data Pin (of course i checked VCC power on), Receiver DATA pin never changes..

1 reply

To be honest I have never tried it in that manner, my logic would tel me that it would not work because the data has to be formulated into int's or some data structure, these radios are not even powerfull enough to sent a float data type. but you can try and please report back to us!