-1

I have Arduino Uno, Arduino Pro Micro, XY-MK-5V and FS1000A. I need transmit data from Pro Micro to Uno.

Transmitter:

    #include <VirtualWire.h>

    void setup() {

      Serial.begin(9600);

      vw_setup(2000);
      vw_set_tx_pin(14);
    }

    void loop() {

      send("Test message!");  
      delay(2000);
    }

    void send (char *message)
    {
      vw_send((uint8_t *)message, strlen(message));
      vw_wait_tx();
    }

Receiver:

#include <VirtualWire.h>

void setup()
{
    Serial.begin(9600);

    vw_set_rx_pin(12);
    vw_setup(2000);

    vw_rx_start();
}

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

    if(vw_get_message(buf, &buflen))
    {
        for(int i = 0; i < buflen; i++)
        {
            Serial.print(buf[i]);
        }

        Serial.println();
    }
}

I dont know why it's doesn't works. When I changed Uno with Micro and Micro with Uno, it's worked.

But I need: Micro + transmitter FS1000A & Uno + receiver XY-MK-5V.

Please help me. I'm using this Pro Micro.

  • What in particular doesn't work? You don't receive any characters? You get a garbage message? – CharlieHanson Jul 24 '15 at 11:31
  • And which Pro Micro: the geniune SparkFun Pro Micro - which version (it says on the PCB); the A-Star variant; a cheap chinese copy? – CharlieHanson Jul 24 '15 at 11:33
  • Are you connecting the modules to the right pins? vw_set_tx_pin(14); looks a bit odd, if you used that on the UNO. – Gerben Jul 24 '15 at 14:35
  • On a Pro Mirco, D14 is connected to the RX LED, and nothing else; it's not broken out to either of the headers so you would never be able to use it to connect to an external component. – CharlieHanson Jul 25 '15 at 12:42
0

Thanks for your answers. I solved this problem, my Chinese copy has problems with power.

| improve this answer | |
  • Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question. – Nick Gammon Aug 17 '15 at 20:31
  • @NickGammon The problem was solved according to feok. This is an answer although it has not been accepted. – Avamander Aug 17 '15 at 22:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.