Apologies, there was an error in the documentation. The latest version is 1.9,
which you can download from
http://www.open.com.au/mikem/arduino/VirtualWire-1.9.zip
There is now a discussion group for VirtualWire at:
http://groups.google.com/group/virtualwire
and I have CCd that
It will compile with arduino 1.0 and earlier.
Cheers.
On Tuesday, February 07, 2012 06:32:57 AM you wrote:
> Yes V1 I did get the latest version and thats the error I am still getting
>
> In file included from MyVWRreceiver.cpp:4:0:
> /root/sketchbook/libraries/VirtualWire/VirtualWire.h:14:20: fatal error:
> wiring.h: No such file or directory compilation terminated.
>
>
>
> On Mon, 06 Feb 2012 08:54:50 +1000
>
> Mike McCauley <mi...@open.com.au> wrote:
> > Hello,
> >
> > Sounds like you are using Arduino 1.0?
> >
> > VirtualWire has been updated recently so it will build with 1.0. Please
> > download latest version.
> >
> > Also there is now a Google group for VirtualWire discussion, see the
> > latest version of the doc for details.
> >
> > Cheers.
> >
> > On Monday, February 06, 2012 08:19:58 AM you wrote:
> > > Hey there Mike
> > >
> > > I'm using your library "VirtualWire" again for another project but I
> > > keep getting this error , cant find "wiring.h"
> > >
> > > I saw on the forum replace "wiring.h" with "wiring_private.h" in the
> > > "Tone" library fixed it but I did not find a solution for my
> > > problem yet
> > >
> > > Do you know what happened to "wiring.h" ?
--
Mike McCauley mi...@open.com.au
Open System Consultants Pty. Ltd
9 Bulbul Place Currumbin Waters QLD 4223 Australia http://www.open.com.au
Phone +61 7 5598-7474 Fax +61 7 5598-7070
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS,
TTLS, PEAP, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP,
DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS, NetWare etc.
I am unable to read whatever it was you posted. Perhaps its HTML? Can you post
in a format thats readable?
Anyway, are you able to compile any of the example programs that came with
VirtualWire?
What version of arduino are you using?
Cheers.
On Monday, February 06, 2012 01:57:36 PM Ty wrote:
> Mike I got 1.9 but still get that same error-Ill just recheck--Yep
> just the same
> here's what I am trying to compile
> [quote]
> [color=#7E7E7E]/* Receiver *[/color]
> [color=#7E7E7E] * *[/color]
> [color=#7E7E7E] * */[/color]
> #include <VirtualWire.h>
> [color=#CC6600]char[/color] msg[50]=[color=#006699]""[/color];
> [color=#CC6600]char[/color] temp[5]=[color=#006699]""[/color];
> [color=#CC6600]int[/color] itemp;
> [color=#CC6600]float[/color] ftemp;
>
> [color=#CC6600]void[/color] [color=#CC6600][b]setup[/b][/color]()
> {
> vw_set_rx_pin(11); [color=#7E7E7E]//defaults to 11 but you can
> change it if you wish[/color]
> vw_set_tx_pin(12); [color=#7E7E7E]// defaults to 12 [/color]
> [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]begin[/color]
> (9600); [color=#7E7E7E]// Debugging only[/color]
> [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]println[/color]
> ([color=#006699]"setup and waiting for transmission"[/color]);
> [color=#7E7E7E]// Initialise the IO and ISR[/color]
> vw_set_ptt_inverted([color=#CC6600]true[/color]); [color=#7E7E7E]//
> Required for DR3100[/color]
> vw_setup(2000); [color=#7E7E7E]// Bits per sec[/color]
> vw_rx_start(); [color=#7E7E7E]// Start the receiver PLL
> running[/color]
> }
>
> [color=#CC6600]void[/color] cutMsg()
> {
> [color=#CC6600]char[/color] loc1[10]=[color=#006699]""[/color];
> [color=#CC6600]char[/color] loc2[10]=[color=#006699]""[/color];
> [color=#CC6600]char[/color] ctemp1[5]=[color=#006699]""[/color];
> [color=#CC6600]char[/color] ctemp2[5]=[color=#006699]""[/color];
> [color=#CC6600]int[/color] itemp;
> [color=#CC6600]float[/color] ftemp1;
> [color=#CC6600]float[/color] ftemp2;
> [color=#CC6600]char[/color] *pch;
>
> [color=#CC6600]while[/color] (pch !=NULL){
>
> pch=strtok(msg,[color=#006699]","[/color]);
> [color=#CC6600]for[/color] ([color=#CC6600]int[/color]
> i=0;1<strlen(pch)+1;i++){
> loc1[i]= *pch;
> pch++;}
> [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]println[/color]
> (loc1);
>
> pch=strtok(NULL,[color=#006699]","[/color]);
> [color=#CC6600]for[/color] ([color=#CC6600]int[/color]
> i=0;1<strlen(pch)+1;i++){
> ctemp1[i]=*pch;
> pch++;}
> [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]println[/color]
> (ctemp1);
> ftemp1=atof(ctemp1);
> ftemp1=ftemp1/100;
> [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]println[/color]
> (ftemp1);
>
> pch=strtok(NULL,[color=#006699]","[/color]);
> [color=#CC6600]for[/color] ([color=#CC6600]int[/color]
> i=0;1<strlen(pch)+1;i++){
> loc2[i]=*pch;
> pch++;}
> [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]println[/color]
> (loc2);
>
> pch=strtok(NULL,[color=#006699]","[/color]);
> [color=#CC6600]for[/color] ([color=#CC6600]int[/color]
> i=0;1<strlen(pch)+1;i++){
> ctemp2[i]=*pch;
> pch++;}
> [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]println[/color]
> (ctemp2);
> ftemp2=atof(ctemp2);
> ftemp2=ftemp2/100;
> [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]println[/color]
> (ftemp2);
>
> pch=strtok(NULL,[color=#006699]","[/color]);
> [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]print[/color]
> (loc1);
> [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]print[/color]
> ([color=#006699]" "[/color]);
> [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]println[/
> color] (ftemp1);
> [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]print[/color]
> (loc2);
> [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]print[/color]
> ([color=#006699]" "[/color]);
> [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]println[/
> color] (ftemp2);
>
> }
> }
> [color=#CC6600]void[/color] [color=#CC6600][b]loop[/b][/color]()
> {
> uint8_t buf[VW_MAX_MESSAGE_LEN];
> uint8_t buflen = VW_MAX_MESSAGE_LEN;
>
> [color=#CC6600]if[/color] (vw_get_message(buf, &buflen))
> [color=#7E7E7E]// Non-blocking[/color]
> {
> [color=#CC6600]for[/color] ([color=#CC6600]int[/color] i=0;i<50;i+
> +) msg[i]=0;
> [color=#CC6600]digitalWrite[/color](13, [color=#CC6600]true[/
> color]); [color=#7E7E7E]// Flash a light to show received good
> message[/color]
> [color=#7E7E7E]// Message with a good checksum received, dump it.[/
> color]
>
> [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]print[/color]
> ([color=#006699]"Got: "[/color]);
> [color=#CC6600]for[/color] ([color=#CC6600]int[/color] i = 0; i
> < buflen; i++)
> {
> [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]print[/
> color](buf[i], BYTE);
> msg[i]=buf[i];
> }
> [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]println[/
> color]();
> cutMsg();
> }
> [color=#CC6600]digitalWrite[/color](13, [color=#CC6600]false[/
> color]);
>
> }
>
>
> [/quote]
> Hello,
>
> I am unable to read whatever it was you posted. Perhaps its HTML? Can you post
> in a format thats readable?
>
> Anyway, are you able to compile any of the example programs that came with
> VirtualWire?
>
> What version of arduino are you using?
>
> Cheers.
That was a copy for the forum in Arduino Version 1.0
I reposted it as text from the sketch window
Did you see that?
Anyway the first copy for forum gives it all a font colour and thats what you could not understand.
Here it is again in text in case
/* Receiver *
* *
* */
#include <VirtualWire.h>
char msg[50]="";
char temp[5]="";
int itemp;
float ftemp;
void setup()
{
vw_set_rx_pin(11); //defaults to 11 but you can change it if you wish
vw_set_tx_pin(12); // defaults to 12
Serial.begin(9600); // Debugging only
Serial.println("setup and waiting for transmission");
// Initialise the IO and ISR
vw_set_ptt_inverted(true); // Required for DR3100
vw_setup(2000); // Bits per sec
vw_rx_start(); // Start the receiver PLL running
}
void cutMsg()
{
char loc1[10]="";
char loc2[10]="";
char ctemp1[5]="";
char ctemp2[5]="";
int itemp;
float ftemp1;
float ftemp2;
char *pch;
while (pch !=NULL){
pch=strtok(msg,",");
for (int i=0;1<strlen(pch)+1;i++){
loc1[i]= *pch;
pch++;}
Serial.println(loc1);
pch=strtok(NULL,",");
for (int i=0;1<strlen(pch)+1;i++){
ctemp1[i]=*pch;
pch++;}
Serial.println(ctemp1);
ftemp1=atof(ctemp1);
ftemp1=ftemp1/100;
Serial.println(ftemp1);
pch=strtok(NULL,",");
for (int i=0;1<strlen(pch)+1;i++){
loc2[i]=*pch;
pch++;}
Serial.println(loc2);
pch=strtok(NULL,",");
for (int i=0;1<strlen(pch)+1;i++){
ctemp2[i]=*pch;
pch++;}
Serial.println(ctemp2);
ftemp2=atof(ctemp2);
ftemp2=ftemp2/100;
Serial.println(ftemp2);
pch=strtok(NULL,",");
Serial.print(loc1);
Serial.print (" ");
Serial.println (ftemp1);
Serial.print(loc2);
Serial.print (" ");
Serial.println (ftemp2);
}
}
void loop()
{
uint8_t buf[VW_MAX_MESSAGE_LEN];
uint8_t buflen = VW_MAX_MESSAGE_LEN;
if (vw_get_message(buf, &buflen)) // Non-blocking
{
for (int i=0;i<50;i++) msg[i]=0;
digitalWrite(13, true); // Flash a light to show received good message
// Message with a good checksum received, dump it.
Serial.print("Got: ");
for (int i = 0; i < buflen; i++)
{
Serial.print(buf[i], BYTE);
msg[i]=buf[i];
}
Serial.println();
cutMsg();
}
digitalWrite(13, false);
}
On Tuesday, February 07, 2012 07:33:19 PM From Yahoo wrote:
> On Tue, 07 Feb 2012 08:04:05 +1000
>
> Mike McCauley <mi...@open.com.au> wrote:
> > Hello,
> >
> > I am unable to read whatever it was you posted. Perhaps its HTML? Can
> > you post in a format thats readable?
> >
> > Anyway, are you able to compile any of the example programs that came
> > with VirtualWire?
What is the answer to that question?
> >
> > What version of arduino are you using?
> >
> > Cheers.
>
> That was a copy for the forum in Arduino Version 1.0
VirtualWire and its example programs compile under arduino 1.0 and earlier
versions.
Im not sure you are running what you think you are running.
When I compile your example code, posted a few days ago, with arduino 1.0, and
the latest version of VirtualWire, I get this compiler error from your code:
sketch_feb08a.cpp: In function 'void loop()':
sketch_feb08a:88: error: 'BYTE' was not declared in this scope
As of Arduino 1.0, the 'BYTE' keyword is no longer supported.
Please use Serial.write() instead.
Under arduino-0021, your example code compiles fine.
Are you sure you have VirtualWire-1.9 unpacked in the right place?
Cheers.
The first problem is that VirtualWire.h calls wiring.h
wiring.h does not appear in Arduino_1.0 or in VirtualWire_1.9 .
So I am wondering why it is called or is it an error and should not be called.
See attached screenshot . Your library is in /sketchbook/libraries/
Psearch did not find wiring.h on my computer at all.
--
From Yahoo <tyt...@yahoo.com>
I think you still have some old version of VirtualWire installed in
/root/sketchbook/libraries/VirtualWire/