Go Down

Topic: Virtual wire problem (Read 6 times) previous topic - next topic

ddproject

hi...
My  VirtualWire examples gives de error again and again
In file included from transmitter.cpp:11:
C:\Users\Administrator\Desktop\my project\arduino-1.0-windows\arduino-1.0\libraries\VirtualWire/VirtualWire.h:15:20: error: wiring.h: No such file or directory
In file included from transmitter.cpp:11:
VirtualWire.h:60: error: variable or field 'vw_set_tx_pin' declared void
VirtualWire.h:60: error: 'uint8_t' was not declared in this scope
VirtualWire.h:64: error: variable or field 'vw_set_rx_pin' declared void
VirtualWire.h:64: error: 'uint8_t' was not declared in this scope
VirtualWire.h:68: error: variable or field 'vw_set_ptt_pin' declared void
VirtualWire.h:68: error: 'uint8_t' was not declared in this scope
CVirtualWire.h:72: error: variable or field 'vw_set_ptt_inverted' declared void
VirtualWire.h:72: error: 'uint8_t' was not declared in this scope
VirtualWire.h:77: error: variable or field 'vw_setup' declared void
VirtualWire.h:77: error: 'uint16_t' was not declared in this scope
VirtualWire.h:91: error: 'uint8_t' does not name a type
VirtualWire.h:99: error: 'uint8_t' does not name a type
VirtualWire.h:105: error: 'uint8_t' does not name a type
VirtualWire.h:108: error: 'uint8_t' does not name a type
VirtualWire.h:113: error: 'uint8_t' does not name a type
transmitter.cpp: In function 'void setup()':
transmitter:26: error: 'vw_set_tx_pin' was not declared in this scope
transmitter:27: error: 'vw_set_rx_pin' was not declared in this scope
transmitter:28: error: 'vw_set_ptt_pin' was not declared in this scope
transmitter:29: error: 'vw_set_ptt_inverted' was not declared in this scope
transmitter:30: error: 'vw_setup' was not declared in this scope
transmitter.cpp: In function 'void loop()':
transmitter:41: error: 'vw_send' was not declared in this scope

can anyone help??





skyjumper

Did you include the library header? Did you select the correct board?

Post a code example that causes the errors...

Nick Gammon

Near the start of the VirtualWire.h file you should see this:

Code: [Select]
#include <stdlib.h>
#if ARDUINO >= 100
  #include <Arduino.h>
#else
  #include <wiring.h>
#endif


If you only see:

Code: [Select]
#include <stdlib.h>
#include <wiring.h>


Then replace that by the lines above.

ddproject

thanks a lot..  wen i replaced with those lines it worked fine..
can u help me how to transmit bit by bit data that is available in my serial port to the transmitter??
i actually connected my webcam to arduino and got the digital output serially now gotta transmit through RF

ddproject

hii..
i used the following code to get digital output from my webcamera..now i need to transmit the data serially to an RF transmitter..
how to do it??


int ledPin=9;
int digPin=3;
int digiPin=10;

void setup()
{
  Serial.begin(9600);
  pinMode(ledPin,OUTPUT);
  pinMode(digPin,INPUT);
  pinMode(digiPin,OUTPUT);
}

void loop()
{
  int value;
  value= digitalRead(digPin);
  Serial.println(value);
  if(value==0)
  digitalWrite(ledPin,LOW);
  else
  digitalWrite(ledPin,HIGH);

}

Grumpy_Mike

Quote
used the following code to get digital output from my webcamera.

Do you!!
How does that work then?

ddproject

i am getting serial data output from my digital webam.. my prob is how to transmit it to an RF transmitter?

Nick Gammon

Topics merged. They seem to me to be on the same subject.

ddproject

may i know how to transmit digital data from one arduino to another via RF??
should i store the digital values in a buffer and transmit?
if so how to do it??

Nick Gammon

I don't understand that, sorry. Perhaps if you described your hardware...

winner10920

It would help to know what kind of rf module you are using, maybe with a datasheet link,
and what are you going to do with that data? It maybe a bit hard to do much with just two arduinos

ddproject

i am using RF433Mhz transmitter and receiver..

i dunno how to transmit integer values that appear in my serial port via RF..
there are many examples on how to transmit msgs only..
i think we have to store the integer values in an buffer and send it..
do we have to use a serial buffer?? if so how??
how to set the buffer size??

NI$HANT

Quote
i dunno how to transmit integer values that appear in my serial port via RF..


one byte after byte transfer happens to whatever you write on Serial there is no special system about it.
for example when you type "Nishant" (N-i-s-h-a-n-t and not Nishant in one go)it goes through Serial RX/TX pins of your arduino to which the transmitter may be connected and if its there then information flows one by one.

"Real Men can Accomplish  Anything"
-  Website  
- skype : nishants5  

????? ???? !

hilukasz

so I was running into same problem and tried replacing said lines, however I get a new error:

Code: [Select]
error: WProgram.h: No such file or directory
for(i = 0, i < 820480075, i++){ Design(); Code(); delay(1000); } // hellowoo.com

Go Up