Error transmitter 433Mhz

I am French sorry for this translation

Hello I have a problem with a transmitter 433Mhz,

I have a transmitter 433 Mhz, it transmits a code 7649BD4, how to proceed to the reception so that arduino decodes this hexadecimal code,

Can you help me please.

For help, please read and follow the directions in the "How to use this forum" post.

I know how to use the forum but the French can not know my problem

NO, you do not know how to use the forum. Read the post and follow the directions.

But I ask for help in the English category, what's wrong?
i don't understand

So, can you help me please?

Summary of the instructions in the "How to use this forum" post:

  1. Post the code, using code tags
  2. Post links to the modules you are using
  3. Describe what the program should do, and what it does instead
  4. If necessary, post a wiring diagram (not a Fritzing idiot diagram)
#include <VirtualWire.h>

void setup() {
  vw_setup(2000);
  vw_set_rx_pin(2);
  vw_rx_start();
  Serial.begin(9600);
   Serial.println("Begun !");
}

void loop() {
  uint8_t buflen = VW_MAX_MESSAGE_LEN;
  uint8_t buf[buflen];

  if(vw_get_message(buf, &buflen)) {
    Serial.println("test");
  }
}

My receiver : http://www.instructables.com/id/RF-315433-MHz-Transmitter-receiver-Module-and-Ardu/

The program does not display anything, I want the arduino program to display the haxadecimal code of the receiver.

In RadioHead, you do this:

	driver.printBuffer("Got:", buf, buflen);

If Virtual Wire doesn't implement that function, just switch to RadioHead. :slight_smile:

how use driver.printBuffer("Got:", buf, buflen); ??

Apex142:
how use driver.printBuffer("Got:", buf, buflen); ??

Put your eyes in front of the serial monitor and read the results.

No working,

#include <VirtualWire.h>

void setup() {
  vw_setup(2000);
  vw_set_rx_pin(2);
  vw_rx_start();
  Serial.begin(9600);
   Serial.println("Begun !");
}

void loop() {
  uint8_t buflen = VW_MAX_MESSAGE_LEN;
  uint8_t buf[buflen];

  driver.printBuffer("Got:", buf, buflen);
}

Error : 'driver' was not declared in this scope

No working,

Of course it isn't. Re-read reply # 8, paying attention this time.

sorry but i dont understand RadioHead

The VirtualWire library is obsolete. The replacement is the RadioHead library. Forget that VirtualWire, and the examples that come with it exist.

Download and install the RadioHead library, and use the examples that come with it as the starting point for YOUR code.

Then, you can use the method that was suggested without the compiler pitching a fit.

Virtual Wire also has what you are asking for.

aarg no, working,

#include <VirtualWire.h>

void setup()
{
    Serial.begin(9600);  // Debugging only
    Serial.println("setup");

    // Initialise the IO and ISR
    vw_set_ptt_inverted(true); // Required for DR3100
    vw_set_rx_pin(2);
    vw_setup(2000);  // Bits per sec
    vw_rx_start();       // Start the receiver PLL running
}

void loop()
{
    uint8_t buf[VW_MAX_MESSAGE_LEN];
    uint8_t buflen = VW_MAX_MESSAGE_LEN;

    if (vw_get_message(buf, &buflen)) // Non-blocking
    {
  int i;

        digitalWrite(13, true); // Flash a light to show received good message
  // Message with a good checksum received, dump it.
  Serial.print("Got: ");
 
  for (i = 0; i < buflen; i++)
  {
      Serial.print(buf[i], HEX);
      Serial.print(" ");
  }
  Serial.println("");
        digitalWrite(13, false);
    }
}

Post a clear photograph of your hardware.

Receive :

Data -> D2
VCC -> 5V
GRND -> GRND

Can you help me, please ?