Hi Guys. Im having trouble with radioheads ask transmitter sketch.
as below.
// 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 <RH_ASK.h>
#include <SPI.h> // Not actually used but needed to compile
RH_ASK driver
void setup()
{
Serial.begin(9600); // Debugging only
if (!driver.init())
Serial.println("init failed");
}
void loop()
{
const char *msg = "hello";
driver.send((uint8_t *)msg, strlen(msg));
driver.waitPacketSent();
delay(200);
}
it comes up with errors.
Arduino: 1.5.6-r2 (Windows 7), Board: "Arduino Uno"
ask_transmitter.pde: In function 'void setup()':
ask_transmitter:15: error: 'driver' was not declared in this scope
ask_transmitter.pde: In function 'void loop()':
ask_transmitter:23: error: 'driver' was not declared in this scope
I am a newbie on here and trying to learn so forgive me if it is something silly! I have been trying to use virtual wire but there is conflicts with my program so this is the route i have taken.
Thanks Gav.