Receiver not working

I am having trouble with the receiver on my project. Specifically, the code to check if a message was received never goes true. I tried uploading the receiver example code and it seemed to work, but I can't figure out what specifically is different (besides names or pin numbers). The following line of code is the specific issue I am having trouble with:

if (vw_get_message(buf, &buflen)) // if we receive a message

This line never goes true so my code never executes. I have attached the full code.
flowerPotMonitor_receive.ino (2.4 KB)

Any help would be grateful.


You can use a product like WinMerge for comparison.

Hi, @awestcott
What project?
What hardware?
What code?

Sorry but we need more than;

A circuit diagram of transmit and receive circuits would be appreciated?

How do you know its a receive problem and not a transmitter fault?

Thanks.. Tom... :grinning: :+1: :coffee: :australia:


Op has an example that works, similar to what he attached, yes, it would have been better to have it in the post with </> tags... but.

Op made a few changes. Code does not work. Eyeballing it Op cannot see the issue.

This is what text comparison tools do... compare two (hopefully similar) text files and color-highlight the changes. This is an educational opportunity to learn a new tool which will serve Op well over time. Catch that misplaced comma or semicolon!

If I proof Op's code, what good is that?


Hey, Tom, Hope you are doing well.

@TomGeorge Attached are the schematics of the transmitter and receiver. The code was attached in my initial post.


As I stated earlier, I uploaded an example code to the circuit (with the pin number changes) and I was receiving data (as per the serial monitor) and the led. My code will not turn on the led since it is not getting past the if statement.

So, what Tom and I were discussing is that (most) forum members prefer to have the attachment inline... paste using </> tags.

But, you have good code and similar error-producing code. WinMerge will compare the two copies - Hopefully allowing you to find your issue.

Try it. You can resolve this using the working example.


Maybe this will show the value of using good diagnostic tools...

See anything strange in the left (your edit) pane?

@mrburnette If you are referring to the tx and rx pins being the same number, they are on different Arduinos so that should not be an issue. I only added the tx pin and the ptt pin because they were in the example code. Otherwise I am not sure what you are referring to.



But its in the ONE code, so what is pin 12 tx or tx, it cannot be the same in the one code.
They should be different in each code.
(Have you forgotten to comment one of the lines out?)
In your code as it stands, rx is pin 12, same as in other code.......

No, please circuit diagrams please, not Fritzy images.
Draw and post images of your circuits, include power supply, component labels and pin names.

Thanks.. Tom.... :grinning: :+1: :coffee: :australia:

@TomGeorge I have attached the circuit diagrams. They are just pinouts (hopefully that is good enough for you; I don't have the Arduino Library for my Schematic Editor).


Thanks for the schematics.

In your Tx code
you should have ;




Tom... :grinning: :+1: :coffee: :australia:

@TomGeorge Thanks for the suggestion but that made no difference. I also tried removing the tx pin in the Rx code.

Have you got aerials on the Tx and Rx?

Can you please post a picture of your project, so we can see your component layout?

Thanks.. Tom.. :grinning: :+1: :coffee: :australia:

@TomGeorge Yes I do have aerials on the Tx and Rx. Attached are pictures of my project.


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