rf 433 mhz 2 arduinos


i have recently receivd my rf modules. my arduino uno is transmitting. but my arduino due won't work with the virtualwire lib. it gives my the error when compiling:

Build options changed, rebuilding all C:\Users\Admin\Desktop\arduino-1.5.8\libraries\VirtualWire\oldVirtualWire.cpp: In function 'void vw_setup(uint16_t)': C:\Users\Admin\Desktop\arduino-1.5.8\libraries\VirtualWire\oldVirtualWire.cpp:370:5: error: 'TCCR1A' was not declared in this scope TCCR1A = 0; // Output Compare pins disconnected ^ C:\Users\Admin\Desktop\arduino-1.5.8\libraries\VirtualWire\oldVirtualWire.cpp:371:5: error: 'TCCR1B' was not declared in this scope TCCR1B = _BV(WGM12); // Turn on CTC mode ^ C:\Users\Admin\Desktop\arduino-1.5.8\libraries\VirtualWire\oldVirtualWire.cpp:371:18: error: 'WGM12' was not declared in this scope TCCR1B = _BV(WGM12); // Turn on CTC mode ^ C:\Users\Admin\Desktop\arduino-1.5.8\libraries\VirtualWire\oldVirtualWire.cpp:371:23: error: '_BV' was not declared in this scope TCCR1B = _BV(WGM12); // Turn on CTC mode ^ C:\Users\Admin\Desktop\arduino-1.5.8\libraries\VirtualWire\oldVirtualWire.cpp:378:5: error: 'OCR1A' was not declared in this scope OCR1A = nticks; ^ C:\Users\Admin\Desktop\arduino-1.5.8\libraries\VirtualWire\oldVirtualWire.cpp:385:5: error: 'TIMSK' was not declared in this scope TIMSK |= _BV(OCIE1A); ^ C:\Users\Admin\Desktop\arduino-1.5.8\libraries\VirtualWire\oldVirtualWire.cpp:385:18: error: 'OCIE1A' was not declared in this scope TIMSK |= _BV(OCIE1A); ^ C:\Users\Admin\Desktop\arduino-1.5.8\libraries\VirtualWire\oldVirtualWire.cpp: At global scope: C:\Users\Admin\Desktop\arduino-1.5.8\libraries\VirtualWire\oldVirtualWire.cpp:568:7: error: expected constructor, destructor, or type conversion before '(' token SIGNAL(TIMER1_COMPA_vect) ^ C:\Users\Admin\Desktop\arduino-1.5.8\libraries\VirtualWire\oldVirtualWire.cpp:648:1: error: expected '}' at end of input } ^ Fout bij compileren.

what can i do?


Not much, I think the VirtualWire is not for the Due. Can you use transceiver modules instead ?

You can look into Radiohead for the Due http://www.airspayce.com/mikem/arduino/RadioHead/

thanks now its working

Nice! Good to know.


I have the same compilation errors than you, except with an genuino 101. What did you do to solve them ?


The 101 is actually a Intel Curie chip, so you will not get much out of it. From the Arduino.cc 101 page: "The module contains two tiny cores, an x86 (Quark) and a 32-bit ARC architecture core, both clocked at 32MHz"

When you say that I "will not get much out of it", what do you mean ?

So is it possible to make the Virtualwire library work on the genuino 101 ?

Not without a lot of reworking. What I meant to say is that the 101 has an Intel core, which is incompatible with the AVR timers and such. But for all I know, someone has written a emulation library that is like the Teensy's.

Ok thank you :)