Radiohead transmitting 433MHz

Here is my code:

// ask_transmitter.pde
// -- mode: C++ --
// Simple example of how to use RadioHead to transmit messages
// with a simple ASK transmitter in a very simple way.
// Implements a simplex (one-way) transmitter with an TX-C1 module

#include “C:\Users\lherron8\Desktop\RadioHead-master\RH_ASK.h”
#include <SPI.h> // Not actually used but needed to compile

RH_ASK driver;

struct dataStruct{
float string;
unsigned long counter;

}myData;

byte tx_buf[sizeof(myData)] = {0};

void setup()
{
Serial.begin(9600); // Debugging only
if (!driver.init())
Serial.println(“init failed”);

myData.string = 10;

}

void loop()
{

memcpy(tx_buf, &myData, sizeof(myData) );
byte zize=sizeof(myData);

driver.send((uint8_t *)tx_buf, zize);

// driver.send((uint8_t *)msg, strlen(msg));
driver.waitPacketSent();
myData.counter++;
delay(2000);
}

Here are the errors I get:

Arduino: 1.6.5 (Windows 7), Board: “Arduino Mini, ATmega328”

ask_attempt.cpp.o: In function __static_initialization_and_destruction_0': C:\Users\lherron8\Desktop\arduino-1.6.5-r2/ask_attempt.ino:10: undefined reference to RH_ASK::RH_ASK(unsigned int, unsigned char, unsigned char, unsigned char, bool)’

ask_attempt.cpp.o: In function setup': C:\Users\lherron8\Desktop\arduino-1.6.5-r2/ask_attempt.ino:24: undefined reference to RH_ASK::init()’

ask_attempt.cpp.o: In function loop': C:\Users\lherron8\Desktop\arduino-1.6.5-r2/ask_attempt.ino:38: undefined reference to RH_ASK::send(unsigned char const*, unsigned char)’
collect2.exe: error: ld returned 1 exit status
Error compiling.

I’m just attempting to send any piece of information from a transmitter to a receiver, but I’m not sure how to get rid of these errors. the “arduino-1.6.5-r2” file is the file downloaded from installing the file from the arduino website for the IDE and .ino sketch is the ask_attempt, even though it’s located in the “C:\Users\lherron8\Desktop\RadioHead-master\examples\ask” directory.

If you need anymore information, let me know!

#include "C:\Users\lherron8\Desktop\RadioHead-master\RH_ASK.h"

That is NOT the correct place for an Arduino library.

And purely the placement of the Arduino library on the Desktop is enough to keep my code from compiling error free?

lherron8: And purely the placement of the Arduino library on the Desktop is enough to keep my code from compiling error free?

It can, yes.

Well I was trying to put the contents of the arduino-1.6.5-r2 in my Arduino folder under documents, but then when I try to run the arduino.exe, I get an error saying “Your copy of the IDE is installed in a subfolder of your sketbook. Please move the IDE to another folder.” After moving it, it then says my Java Runtime Environment is missing or corrupted. So I can only run my programming using the IDE if it’s on the desktop so far.

I apologize that this wound up being a non-programming error, but I do still appreciate your help.

I apologize that this wound up being a non-programming error, but I do still appreciate your help.

Maybe it is; maybe it isn't. We don't know yet.

The libraries belong in a folder called libraries in the folder where the sketches are stored. Try putting the library in the proper place. The library folder name should have the -master crap removed from it.

It compiled! Seems like it was just adding radiohead to libraries. Bonehead move on my part, but thank you very much for your help.