module MX-FS-03V

Hello
I'm doing my meter with arduino and I would like to replace the RF12 for MX-FS-03V, is much cheaper on ebay
MX-FS-03V module works with  virtualwire.h
Has anyone done something like this or can help me?

thanks

Robert Wall's picture

Re: module MX-FS-03V

I think the example sketches I found here tell you how to do it. That is sending a single integer value, so instead of send_rf_data( ) I think you will need vw_send((byte *)(&emontx), sizeof(emontx));

At the receiving end, I think you will need (assuming you have identical emontx structures at both ends of the radio link):

uint8_t Buffer_Size;
Buffer_Size = sizeof(emontx);

then

vw_get_message(&emontx, &Buffer_Size);

I cannot test this so it might be completely wrong!

dBC's picture

Re: module MX-FS-03V

assuming you have identical emontx structures at both ends of the radio link

And not just identical from a C definition point of view, but identical from a raw storage point of view.  Different architectures/environments may have different lengths for int for example,  they may pack fields into structures differently in memory, or even use different endianess.

mirasu's picture

Re: module MX-FS-03V

Hello
Thanks for the answers, proves tomorrow :-)

My configuration is:
Arduino nano with emontx and tx433Mhz
Arduino Mega with rx433Mhz, serial and ethernet

The Arduino Nano I want to hide in the fuse box (magnetothermic)
Thanks again

mirasu's picture

Re: module MX-FS-03V

Hello

I do not get to compile the program with the modified.

I would like to receive and send measurements virtualwire by emoncms network.

If you could you help me ..

Sorry for the English I am Spanish and use google :-(

thanks

Robert Wall's picture

Re: module MX-FS-03V

What error message does the compiler give? Also, can you attach the file that is your sketch to your post?

mirasu's picture

Re: module MX-FS-03V

Hello
I have many compilation errors.
and I'm editing the file to meet NanodeRF_Cosm virtualwire. but this has many references to RF12 not if material or replace.
the file with the changes I call rx.

Hope you can help me. Thank you!

Robert Wall's picture

Re: module MX-FS-03V

Compiler errors can mean that something that is required cannot be found on your computer, or that what you are writing is not the correct syntax. I cannot help you until you give the information that I ask for.

mirasu's picture

Re: module MX-FS-03V

these errors are.

 

NanodeRF_Cosm:238: error: expected constructor, destructor, or type conversion before '.' token
NanodeRF_Cosm:249: error: expected constructor, destructor, or type conversion before '.' token
NanodeRF_Cosm:249: error: expected constructor, destructor, or type conversion before '.' token
NanodeRF_Cosm:252: error: expected constructor, destructor, or type conversion before '++' token
NanodeRF_Cosm:253: error: expected constructor, destructor, or type conversion before '.' token
NanodeRF_Cosm:253: error: expected unqualified-id before ')' token
NanodeRF_Cosm:253: error: expected unqualified-id before ')' token
NanodeRF_Cosm:254: error: expected constructor, destructor, or type conversion before '=' token
NanodeRF_Cosm:255: error: expected declaration before '}' token

RF12 is that I have not quite understand how it works. and want to replace it with a cheaper module MX-FS-03V unidirectional and much simpler to use. entiendono because not much difference with RF12

thanks

Robert Wall's picture

Re: module MX-FS-03V

I do not think those errors are from compiling the file you say you are compiling. You wrote that the file you are using is "rx.ino"
The error messages tell me that the file is NanodeRF_Cosm.ino and in that file from Github line 238, which is where the first error is, is a comment.  I cannot help you if you if tell me things that are not true.

Here is how to interpret the error message:

NanodeRF_Cosm:   << The name of the file.

238:      << The line on which the error was detected. The error may be on this line, or it could on the line before or many lines before.

error: expected constructor, destructor, or type conversion before '.' token   << When it saw ".", it expected something like "Serial.print", but the word before the "." did not allow that.

I think you should try the test program in the link I gave you in the second post on Mon, 26/08/2013 - 23:10.  If that compiles correctly, then we know that the virtualwire part is working.

mirasu's picture

Re: module MX-FS-03V

Thank you.
 
rx.ino NanodeRF_Cosm.ino and the file are the same. to save and send not want to rewrite the original and did a save as. I did not realize that came out the file name in the error. Perdon.

On interpreting the error is very useful, thanks

post on the second part ok tx, rx part in the probe with a clean file virtualwire library and you advised me, and I saw the serial and well. but quit after a while, now pretencia finish and use it, because here you have to start to look a lot the electric expense. I need to see the statistics when spending and all that.
So I wanted to change a program that already works with emonCMS, but is as different as it works RF12 and virtualwire

think it's best to start a new program?

thanks

Robert Wall's picture

Re: module MX-FS-03V

I think your messages are suffering in translation, therefore I am not sure that I understand you correctly.

You tried the two programs from http://forum.hobbycomponents.com/viewtopic.php?f=39&t=1324

You compiled the transmitter and receiver sketches and you transferred data from transmitter to receiver. Is that correct?

mirasu's picture

Re: module MX-FS-03V

hello

I'm mirnado what you tell me.

I used the example of the library virtualwire http://www.airspayce.com/mikem/arduino/VirtualWire/

and as I say in # 2 GOT view from 2 arduino by serial readings 1 arduino.
Now I want to send those readings to enc26j80 for uploading to the web. So I wanted to modify that file.

a time to let me try what you told me there's something I like.

thanks

Robert Wall's picture

Re: module MX-FS-03V

Try this Receiver sketch. I do not have an Arduino, I do not have a MX-FS-03V, I do not have a enc26j80 and I do not have COSM; therefore I do not know if it will work.  If it does work, you can use the Transmitter sketch in your first Arduino to send data. You can only send 2 bytes, if you want to send more you must make some changes.

 

mirasu's picture

Re: module MX-FS-03V

Hello
Thanks for the input, unfortunately I do not work yet.
the file I sent me did you? I say this because if you find somewhere would not be in the TX file?
The problem is that I do not get the same as I send. I'm still doing tests to determine where the problem is, if TX or RX.

1000 Thanks

 

by the way I use arduino mega 2560 on the RX, and change the lines if (ether.begin (sizeof Ethernet :: buffer, mymac, 53) == 0)
but not if it affects something else.

thanks

Robert Wall's picture

Re: module MX-FS-03V

I think I cannot help you any more, sorry.

What I did to create that sketch: I removed the parts of the program for the RFM12 radio and I replaced those with the equivalent parts that I took from the example sketch.

We know the Nanode sketch is good with the enc26 module that the Nanode uses.

To make that sketch work, you must debug it because I do not have the hardware to test it on.

 

mirasu's picture

Re: module MX-FS-03V

Thank you!
I keep on trying, I think the error will be in the tx.

Thanks for your time!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.