Passing data between TX118S-4 to RX480E 433mHz

I am attempting to send a short message.
I get nothing seen at the receiver side.

I am using the ASK RadioHead library; I have a copy of the example. The only changes I have made were added to aid debugging.

The transmitter and receiver are tuned to each other.

  • I cleared the receiver (8 presses)
  • I set the receiver to learn (one press)
  • I sent a signal with the transmitter, and the receiver seemed to respond.
    i.e. removing and adding power to the transmitter lights the receiver.

When powered, both transmitter and receiver have a constant light; the transmitter has a slight flicker corresponding to the code delay.

I have attempted to connect the DATA line to the other data pins on both the transmitter and the receiver with no perceived changes.

I have replaced both the transmitter and the receiver.

Oddly, removing the power from the transmitter so that there is only GND & DATA connected, the light on the transmitter flashes (as it might have expected when powered) with the delay time in the code.

Transmitter

Arduino Micro connected to a TX118S

Connections

TX118S Arduino
- GND
+ 5v
1 12

Images so you can be sure I have my head straight about which pin is which :wink:

#include <RH_ASK.h>
#include <SPI.h> // Not actually used but needed to compile

RH_ASK driver;   // txPin = 12

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();
    Serial.println(msg);
    delay(1000);
}

Receiver

Connections

RX480E Arduino
GND GND
+V 3.3v
D0 11

#include <RH_ASK.h>
#include <SPI.h> // Not actually used but needed to compile

RH_ASK driver;  // rxPin = 11


void setup()
{
  Serial.begin(9600);	// Debugging only
  driver.init();
}


void loop()
{
  uint8_t buf[RH_ASK_MAX_MESSAGE_LEN];
  uint8_t buflen = sizeof(buf);
  if (driver.recv(buf, &buflen)) // Non-blocking
    {
      // Message with a good checksum received, dump it.
      
      Serial.print("Message: ");
      Serial.println((char*)buf);       
    }
  else
    Serial.println("No Message");    
}

The anntena are both 17cm.

The modules website

My apologies in advance

  1. If this is something obvious that I have missed - this is my first project ever.
  2. I am posting in the wrong way/place - this is my first post.

The closest post I have seen to this is this one. I added the antennas after reading the post.
Keith

is nowhere used. next Loop() iteration will rewrite it back

Fair point.
Do you think that is what is stopping the message from getting to or being shown by the receiver?

I still seem not to see the message passed when I remove the variable using the code below.

#include <RH_ASK.h>
#include <SPI.h> // Not actually used but needed to compile

RH_ASK driver;  // rxPin = 11


void setup()
{
  Serial.begin(9600);	// Debugging only
  driver.init();
}


void loop()
{
  uint8_t buf[RH_ASK_MAX_MESSAGE_LEN];
  uint8_t buflen = sizeof(buf);
  if (driver.recv(buf, &buflen)) // Non-blocking
    {
      // Message with a good checksum received, dump it.
      
      Serial.print("Message: ");
      Serial.println((char*)buf);       
    }
  else
    Serial.println("No Message");    
}

hm, idk, my test sketch looks same way

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.